My site seems to go on a tailspin- reloading infinitely with the following flood of message if I look in the console. “Error: WixCode Static Events Error: could not find component in the given static event behavior data” When I move all my event handler code into the $w.onReady() function, this behavior stops.
But Wix recommendation is not to place static event handlers inside onReady(). The following code should not be placed inside the onReady() event handler:
Static event handlers that are wired using the Properties panel in the Editor are not placed inside the onReady() event handler.
return statements containing synchronous functions, especially if there is no impact on rendering (such as a query) and no need for SEO. Avoiding these return statements can improve performance. Wix Support is not being particularly helpful in troubleshooting this
Thanks Yisrael, commenting out that code seems to have fixed the issue.
But I do need that bit of logic working, I have had this code in this manner for a while now, wix used to throw an error and progress normally in case the logout() call is made if no users are logged in.
Didn’t realize this could cause the whole site to go on a refresh frenzy.
Thanks again, I will re-implement that logic.
Yes, return of undefinded/null makes sense.
I want to logout if active is not true. I have a custom login mechanism which sets active to true on successful login.