I have the following error in the dev console on my live site when filling out the registration form on my site (https://www.georgianbaysportsclub.com/registration) .
Uncaught (in promise) TypeError: Illegal invocation
at P (eval at evaluateBundle (evaluateBundle.js:188), <anonymous>:3:13756)
at g (eval at evaluateBundle (evaluateBundle.js:188), <anonymous>:3:15392)
at Object.get text [as text] (eval at evaluateBundle (evaluateBundle.js:188), <anonymous>:3:15755)
at Object.keys.reduce.c.value.c.get.d.get [as text] (eval at evaluateBundle (evaluateBundle.js:188), <anonymous>:3:41469)
at v (by75g.js:621)
at by75g.js:254
at c (runtime.js:45)
at Generator._invoke (runtime.js:274)
at Generator.forEach.e.<computed> [as next] (runtime.js:97)
at i (by75g.js:1)
This form has been working fine and I can’t think of any changes that have been made to the code since the time it was working, so I don’t know why it is no longer working.
Any help would be appreciated!
Hey I’ve look at your code, could you pin down when that error occurred? It looks like an issue with a text element.
I believe I’ve got the same issue on one of my project
Bugs and system issues should be reported to Wix Customer Care .
I have passed this on to Customer Care, and they will be in touch to let you know what information will be needed in order to evaluate your issue.
@plomteuxquentin It looks like the issue is being cause by the function I created to add the waiver signings to the waivers database… I moved the call to the function to the click of the accept button in the waiver section and the error now comes up when clicking that button.
The data isn’t being saved to the database either.
This was all working perfectly before so I don’t know why these problems have suddenly started happening.
This is the code that runs when clicking that accept waiver button:
export function waiverPolicyAcceptButton_click(event) {
if ($w("#waiverPolicySignature").valid) {
$w("#waiverPolicyBox").collapse();
$w("#waiverPolicyComplete").show();
$w("#waiverPolicyTitle").html = "<p style='color: #000000; font- family: Avenir'>Waiver of Liability and Assumption of Risk</p>";
$w("#pageHeader").scrollTo();
$w("#submitButton").enable();
insertWaiverSignature();
} else {
$w("#waiverSignatureErrorText").show();
}
}
And here is the insertWaiverSignature function:
function insertWaiverSignature() {
//Insert waiver agreement to waiver colleciton.
let waiverText = $w("#waiver").text;
let signature = $w('#waiverPolicySignature').value;
let fName = $w("#firstNameInput").value;
let lName = $w("#lastNameInput").value;
let email = $w("#emailInput").value;
let toInsert = {
"firstName": fName,
"lastName": lName,
"email": email,
"waiverText": waiverText,
"signature": signature
};
wixData.insert("waivers", toInsert)
.then((results) => {
let item = results; //see item below
console.log(item);
})
.catch((err) => {
console.log("insertWaiverSignature function error");
let errorMsg = "insertWaiverSignature function error:" + err;
});
}