import {test} from 'backend/database.jsw';
$w.onReady(async function () {
console.log("masterPage page is running.");
console.log(await test("From masterPage!"));
console.log("Did test run?");
}
The first console call executes normally.
The second console call causes an error.
The third console call never executes.
Here is the console error:
console.js:35 Error
at i (wixCodeNamespacesAndElementorySupport.min.js:1)
at XMLHttpRequest.n.onreadystatechange (wixCodeNamespacesAndElementorySupport.min.js:1)
at XMLHttpRequest.wrapped (raven.js:376)
e. @ console.js:35
This is Kateryna from Wix Velo team. I am sorry to know that you are experiencing the issue.
From the description you have provided here, it does look like Kristof is correct.
Please note that, due to security regulations, we cannot make changes to the site unless we confirm the domain and that you are the site admin. Therefore, it would be perfect if you could open a ticket to Customer Support , so that we have the details of your account.
In the meantime, I had a look at the live version of what I believe your site is, and could see that you have changed the code since the issue was reported. You commented out the code and I could not see the logs.
I have recreated the same site layout and code in my own account, commented out the Home page code and imported the backend test() function in the masterPage.js file, and could see that the logs have been successfully returned. Here are some screenshots:
Tested in both old and new configurator, as mentioned before, and both were performing correctly.
However, I understand that the issue might still occur on your end, and we would definitely want to investigate it as soon as possible. Please, open the ticket or provide the account email/domain name in this post, and we would be happy to further assist you!
Kind regards,
Kateryna,
Velo Product Support Specialist
Kateryna. I have verified that bringing our site up to the new renderer has fixed the issue. Function calls to the backend are working again. Thank you for your help.
Nevertheless, I am left with the disturbing realization that changes Wix released last December had bugs that broke our site. Then Wix got around this by holding our site back from updates. This ‘patch’ worked until newer Wix updates, which we really needed but did not get, broke our site again. This process is invisible to us, and we are given no control over it; we receive no warnings of pending updates; we are not afforded an opportunity to test our site against new Wix code before it goes public; we have no way to know (or control) what Wix code release our site is on; we were not notified when the bugs that broke our site originally were fixed, nor did anyone pay attention to the fact that, when those bugs were fixed, our site needed to be moved forward again. It seems that the release process at Wix takes no account that your customers have live sites out there that matter when they are broken. I strongly suggest that Wix put in place revisions to the release process that take the needs of customers with live sites into account.
Thank you for the feedback regarding the renderer functionality, I understand your frustration. Our developers constantly try to improve Wix tools and offer better solutions for our users, but, unfortunately, in your case this code mismatch happened.
While I am happy to hear that it has been resolved, we still have forwarded your feedback to the advanced department. They will review it and see which solutions can be offered to improve your experience in the future.
Thank you for the valuable insights and hope you stay safe and healthy!
Kind regards,
Kateryna,
Velo Product Support Specialist