top of page

Forum Posts

angturil
May 14, 2018
In Coding with Velo
I've been having this problem since last thursday. When the form loads, most of the time, it returns an error stating: An error occurred in one of datasetReady callbacks. This is triggered in the $w("#dataset1").onReady( () => { $w("#dataset1").setFieldValues( { "title": userId, "email": userEmail, } ); setFieldValues call, which is necessary for linking. Once this occurs, I can no longer save the form. The problem is intermittent (but very common) and occurs in live and preview mode. www.ryanterminal.com/memberreservation is the live site. This used to work fine before thursday, and I'm at a complete loss as to the nature of the problem. please help. $w.onReady(function () { //TODO: write your page related code here... $w("#dataset1").onError( (operation, error) => { let errorOp = operation; // "save" let errorCode = error.code; // "DS_VALIDATION_ERROR" let errorMessage = error.toString(); // DatasetError: Some of the elements validation failed console ("dataset 1 error: "+errorMessage); } ); // ... var userId; var userEmail; let user = wixUsers.currentUser; userId = user.id; user.getEmail() .then( (email) => { userEmail = email; //$w("#text53").text=email; $w("#dataset1").onReady( () => { //console.log ("UserID: "+userId); //console.log ("Email: "+userEmail); $w("#dataset1").setFieldValues( { "title": userId, "email": userEmail, } ); $w("#Reserve").enable(); $w("#dataset1").onAfterSave( () => { console.log("Form saved"); if(wixUsers.currentUser.loggedIn) { wixLocation.to("https://ryanterminal.com/myreservations"); } } ); } ); } ); }); Also note that commenting out the onAfterSave stuff does not fix the problem.
0
2
378
angturil
May 10, 2018
In Coding with Velo
starting sometime today, my forms will intermitently fail $w("#dataset1").onReady( () => { $w("#dataset1").setFieldValues( { "title": userId, "email": userEmail, } ) .catch( (err) => { let errMsg = err; console.log (errMsg); } ); wixcode-worker.js:1 An error occurred in one of datasetReady callbacks t {code: "DS_NO_CURRENT_ITEM", message: "There is no current item", name: "DatasetError", stack: "DatasetError: There is no current item↵ at I (h…m/services/dbsm-viewer-app/1.241.0/app.js:6:49408", Symbol(error was handled): true} The error sometimes goes away after refreshing, but usually not. This occurs with the live site,preview aswell as a backup from this morning. https://www.ryanterminal.com/memberreservation
0
3
347
angturil
May 07, 2018
In Coding with Velo
I'm having a show stopper issue with a form not switching over to another page after a successful dataset submission. Oh yeah, it works just fine in preview mode. The button saves the data, and switches to the other page. This happens both with a button with a submit action, or with code linked to a click event. ie: $w("#dataset1").save() .then( (item) => { wixLocation.to("/myreservations"); } ) .catch( (err) => { let errMsg = err; changetext("#text64","Missing fields."); } ); Whatever actions I put in here work, such as changing a text message for example, but the wixLocation does nothing. Strangely, when looking at the live console, it does say that the myreservations.js code gets loaded, but it never leaves the form page. Am I missing something? This is keeping me from taking the page live.
0
5
76

angturil

More actions
bottom of page