I make extensive use of lighboxes, and since the turbo upgrade a few weeks ago, they all fail in various ways.
Since there is radio silence on the forum and the Wix site, I went through the trouble of explaining the problem to “Support” with a lengthy email plus screenshots, and after the meaningless initial auto-response, I got this from them, apparently a human:
Thanks for getting back in touch, we are happy to assist you here!
I will refer this forward to our Advanced Troubleshooting team. They will be able to better follow up on this and further check what could be causing this inconvenience.
We will be getting back to you shortly with further news.
If you have any other questions let us know anytime!
Cool, so I patiently wait for a fix, since debugging and good coding takes time.
A week later, I get this response, apparently another bot message or some intern with an attitude cleaning up stale support tickets (emphasis Wix’s):
Hello, Please kindly be advised, while we support Wix Code features and components here in the Support center, we are unable to provide support for custom coding.
For your needs, we highly recommend using the Wix Corvid Forum, where you will be able to interact with others utilizing Wix Corvid as well as Wix Code experts. Do take the time to search through the Posts on the Wix Code Forum, and do consider posting your request as well. When posting, it is helpful to include what your goals are, the JavaScript code you are working on, and screenshots to visualize the process.
The forum is reviewed both by Wix staff, and our community. When posting, please make sure to follow the Guidelines for Posting to the Wix Corvid Forum
If you feel you are experiencing a bug in the Wix Corvid API this issue must be reviewed in the forum.
Have a great day! Chappie, Wix Customer Solutions Expert
Since the old errors continue, and new ones crop up too, and I am instructed to place the “perceived bug in the Wix Corvid API” on this forum, here we go:
All lightboxes worked as advertised in the documentation until about a week ago when this change showed up in the console:
All lightboxes now do the following:
Clicking the CLOSE (close) or the X you get the error “Unhandled promise rejection The object could not be cloned.”
Further, the code in the “.then” does not execute when I get the error message - for example:
Since wix is so slow in loading the lightbox, I change the color of the button or box that was clicked, so the user has confirmation and can now wait for the lightbox to load.
When the lightbox closes, I change the color back to the previous default:
wixWindow.openLightbox("someLightBox").then(dataObj => {
$w("#buttonForSomeLightBox").style.backgroundColor = "#FFFFFF"; // default white
$w("#imgDots").hide("fade");
});
So the button(s) get colored, but are not reset, due to the “clone” error, for example.
Wix “CLOSE” button or Wix “X” icon cause error:
When I turn OFF the wix button and the “X” icon for closing the lightbox, and use my own button with code, everything is back to normal:
Setting:
Code for my button:
export function buttonClose_click(event) {
const dataObj = {};
wixWindow.lightbox.close(dataObj);
}
So, my button works, but clicking anywhere on the page (outside the lightbox) closes the lightbox with the same “clone” error:
Today, I’m also getting a new Wix “API” error.
I like the lightboxes … when they work as advertised (before turbo).
Before I start massive workarounds that produce a vastly inferior UI and user experience, I would like to know if the Wix team is still working on this, or has decided to ignore this.