Over the last a couple of weeks I have had some issues with my Wix site. About a two weeks ago something funny was going on with login. Typically I had been able to login and that was good for about a day. Which meant I could close my browser and come back in short time and re-open without having to log back in. Then the site started requiring me to log in every time I opened the site, even if I had closed the site and reopened it, or if I had refreshed it. After a couple of days the login went back to the way it had been before. On Sunday, Nov 1, one of the pages stopped working “live”. It worked fine in “preview” through the editor. I contacted help and they sent it to the next level of support. It wasn’t until Tuesday morning I received a reply from someone. That’s a whole other issue. The person told me the site worked fine in “preview” but didn’t have access to the page “live”. Some how without me doing anything, the site started working ok again. This morning another page stopped working “live” but when I went into the editor, it worked fine in “preview”. After spending a couple of hours going through the page and the code, I had shut down Firefox at least three times to make sure the site reloaded. Then I checked the forum. I saw that using Chrome I could look for issues. I opened Chrome and, low and behold, the page worked fine “live”. I then opened Edge, the same thing. I re-opened Firefox, my browser of choice, and the page worked fine.
I saw in the forum that Wix was changing some things and I am was wondering if this was impacting what I am seeing with my site. Can someone shed some light on what is happening? It would be greatly appreciated and would sooth my concerns. Hope everyone is doing well, and stay healthy
The recent changes have to do with Corvid and site coding. Your issues are regarding account and account access. This forum is dedicated to Corvid. For questions that are not related to code you can contact Wix Customer Care . You’ll get better help for your problem there.
Regarding your site the works in Preview but not in Live, please post your site’s URL. Explain what the problem is and we will investigate.
Thanks Yisrael for the reply. I will contact customer care for the login issues. Since I sent this message, I tried the page in question again, and it did not work with Firefox. It worked with Chrome and with Edge. My site url is https://www.houstonsongwriters.net/ . The page in question is called, in the editor, “Annual Voting”, the url is
https://www.houstonsongwriters.net/copy-of-vote-sotm-1 . This Page is not currently accessible to members. It was intended to be made active on Friday for our annual voting. I was checking to make sure it was ready when I found the issue. I created the page about a month ago and it worked fine then, live and preview. The page has 6 choices to be made and then there is a submit button to cast the vote. There are also some onclick functions that are supposed happen when the Cast Vote button is clicked. In Firefox, What I see when I click on the “Cast Vote” button, is the functions appear to work but the data is not added to the database (collection). Nor does it go to the message page that states the vote has been added. In Chrome and Edge this does happen. I am at a loss for what is happening. Any help would be greatly appreciated,
@dligget Your code will never run since the code in a dataset onReady() function only runs when then dataset is ready. By the time your code is run after user.getEmail() returns its result, the dataset is already ready - therefore the code that you have won’t even run.
You should do something like this:
$w.onReady(function () {
let user = wixUsers.currentUser;
let userId = user.id;
let isLoggedIn = user.loggedIn;
user.getEmail()
.then((email) => {
$w("#voteemail").value = email;
console.log(email);
let checkEmail = $w("#voteemail").value;
console.log(checkEmail);
$w("#dataset2").setFieldValue("mid", checkEmail);
let cmvote = $w("#dataset3").getCurrentItem().month;
console.log(cmvote)
$w("#votemonth").value = cmvote
$w("#dataset2").setFieldValue("sotmMonth", cmvote);
let cyvote = $w("#dataset3").getCurrentItem().year;
console.log(cyvote)
$w("#voteyear").value = cyvote
$w("#dataset2").setFieldValue("sotmYear", cyvote);
});
});
The datasets should be ready by the time that user.getEmail() returns. If not, you could run the code after both datasets are ready. You do this by handling the Promises returned by both dataset onReady functions. Something like this:
const promise1 = $w("#dataset2").onReady();
const promise2 = $w("#dataset3").onReady();
Promise.all([promise1, promise2]).then( () => {
// all of the code in here will run after both datasets are ready
})
@yisrael-wix Thanks for the information. I modified the code like you suggested, but it would not run even in preview. Below is what will run in preview, Chrome and Edge, but not in Firefox. In Firefox, Everything works except loading (importing) the data into the database(collection).
import wixData from 'wix-data';
import wixUsers from 'wix-users';
$w.onReady(function () {
let user = wixUsers.currentUser;
let userId = user.id;
let isLoggedIn = user.loggedIn;
user.getEmail()
.then( (email) => {
$w("#dataset6").onReady( () => {
console.log("The dataset is ready");
$w("#voteemail").value = email;
console.log(email);
let checkEmail = $w("#voteemail").value ;
console.log(checkEmail) ;
$w("#dataset6").setFieldValue("mEmail", checkEmail);
let cyvote = "2020"
$w("#dataset6").setFieldValue("avYear", cyvote);
} );
} );
});
I removed the “onClick” functions, thinking that may be causing the problem. Early this year there was a problem with “onClick” with Apple products. That has not helped.
I now have two pages that worked a couple of weeks ago but now will not work in Firefox. One of these pages, Monthly Voting, has been working for over 10 months and worked as recently as Oct 31 when we closed the monthly voting for October. Now it does not work with Firefox. As with the Annual Voting everything works except loading importing the data into the database (collection). I found a console in Firefox and copied this message from it
save operation failed: Object { code: “DS_VALIDATION_ERROR” } wixcode-worker.js:18:57444
I am not sure what to do next. Any suggestions would be greatly appreciated