Serious bug! Log in doesn't work !!

Hi WIX

A serious bug has appeared preventing members to log in!

It must be related to a release you did during the week, since it worked fine last week!

The log in feature does not work when “custom sign up” is enabled.
Here is a link to a test login page : https://www.mikrokogebogen.dk/testlogin.

I have a button with uses wix code to prompt login and I have also put the standard login bar.
NONE of them lets the user log in! When you click on them, the sign-up lightbox appears no matter what. Try it yourself.

I hope you can fix this ASAP. There must be other users experiencing this.

Hi,
Can you please share with us the code you’ve written so that we can have a look?

Thanks,
Tal.

Sure, here is the code, but please note that the standard member login bar created by WIX doesn’t work either, so it must be a general issue. Also it worked fine last week.

// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import wixUsers from ‘wix-users’;
import wixLocation from ‘wix-location’;
import wixWindow from ‘wix-window’;
import wixData from ‘wix-data’;

$w.onReady( function () {

// if (wixWindow.rendering.renderCycle === 1) {
if (wixUsers.currentUser.loggedIn) {
$w(“#loginButton”).label = “Log ud”;
$w(“#SearchBox”).show();
$w(“#indhold”).enable();
$w(“#minkonto”).enable();
} else {
$w(“#loginButton”).label = “Log ind”;
$w(“#SearchBox”).hide();
$w(“#indhold”).disable();
$w(“#minkonto”).disable();
}
// }

});

export function loginButton_click(event) {
// user is logged in
if (wixUsers.currentUser.loggedIn) {
// log the user out
wixUsers.logout()
.then(() => {
// update buttons accordingly
$w(“#loginButton”).label = “Log Ind”;
$w(“#SearchBox”).hide();
$w(“#indhold”).disable();
$w(“#minkonto”).disable();
});
}
// user is logged out
else {
// prompt the user to log in
wixUsers.promptLogin({ “mode”: “login”, “lang”: “da” })
// wixUsers.promptLogin()
.then((user) => {
let userId = user.id;
console.log(“User is logged in”);
// update buttons accordingly
$w(“#loginButton”).label = “Log ud”;
$w(“#SearchBox”).show();
$w(“#indhold”).enable();
$w(“#minkonto”).enable();
// Go to Indhold page after login
wixLocation.to(‘/indhold’);
})
. catch ((err) => {
console.log(err);
// log the error that occurred
// console.log(‘Den gik ikke’);
let ErrorMsg = String(err);
let url = wixLocation.url;
let ErrorEvent = “Log bruger ind”;
let toInsert = {
“ErrorMessage”: ErrorMsg,
“URL”: url,
“ErrorEvent”: ErrorEvent
};
wixData.insert(“ErrorLog”, toInsert)
.then((results) => {
let item = results;
})
. catch ((error) => {
let ErrorMsg2 = error;
console.log(ErrorMsg2);
});
});
}

}

Hi I have the same problem I asked about it last week and had no response. The only work around I could find was to send the user to a members only page which will then prompt the login.

export function Login() {
wixLocation.to(‘/club-news-1’)
}
and then if you wanted you could send them to another page on login.

Strange thing that they haven’t fixed this yet!

The workaround I did, was to log the user in myself using input fields and wix code.

Hi @mikrokogebogen ,
I’ve accessed your editor and couldn’t find your Members collection. Have you followed the instructions of creating your own members area as explained here ?