Hello everyone, I’m new to this community and wix website , I have started developing my website and need help on below query, if some one from the community can help/suggest me on below issue will be deeply appreciated.
This issue has been identified when user register themselves in my test website, I have written below code to register user in the website.
"
import wixUsers from ‘wix-users’;
import wixWindow from ‘wix-window’;
import wixLocation from ‘wix-location’;
$w.onReady( function () {
// new code added here
$w(“#submit”).onClick( (event) => {
let emails = $w(“#emails”).value;
let password = $w(“#password”).value;
let firstname = $w(“#firstname”).value;
let lastname = $w(“#lastname”).value
wixUsers.register(emails, password, {
contactInfo: {
“firstName”: firstname,
“lastName”: lastname
}
} )
.then( (result) => {
let resultStatus = result.status;
wixLocation.to(“test/thankyou-page”);
console.log(“registered successfully”);
} );
} );
});
"
and when user register enters all the requisite details and press submit button- Nothing happens , user is not reallocated to the defined wix-location also i can see the below error message in the developers console - "UNHANDLED PROMISE REJECTION UNKNOWN FAILURE(500) "
but being a administrator, i can see a new notification appears on my dashboard confirming me the user is registered successfully. please advise.
Many Thanks
Sushant