#WixTurbo
I’ve seen many people posting about code breaking randomly though it was previously working over the past couple of weeks, and now it has happened to me.
In my case, it broke some animations on items where I was using a hybrid GUI and code approach, but I was able to quickly fix that by making it all code.
However, the other thing it broke was simple html formatting on text and styling on boxes…
The code hasn’t been altered, and this stuff is so basic there’s no way it was my doing. Code on other pages has also been broken that’s more complex and I might update it once I figure out what’s going on, but this has got to be a bug on Wix’s side.
@yisrael-wix @yoav-wix @ohad-laufer @alexander-jdanov @chaim-kram Could you please inquire about this/inform us on progress?
UPDATE 4/4:
- Fix for failing #wixLocation links:
Instead of :
const itemLink = itemData.link;
wixLocation.to(itemLink)
Use this, which is far better practice anyway:
const itemText = itemData.text;
const itemLink = itemData.link;
$w('#text').html = `<span><a href ="/missingUrlString+${itemLink}">${itemText}</a></span>`;
-
Fix for #wixData connections: ???/Super inconsistent.
-
Fix for broken animations: Use code only. Link to API.
-
Fix for hidden/collapsed elements not being triggered: ???/f*ck around with your design and code until something works. I tried a whole bunch of other stuff but this was the only thing that worked in the end.
-
Fix for iFrames: As @tabraham found, they’re not refreshing consistently on dynamic page load. So use postMessage without waiting for onMessage, or else try this to refresh the iFrame:
if (wixWindow.rendering.env === "browser") {
var iframe = $w('#html1');
iframe.src = iframe.src;
await iframe.src;
setTimeout(function() {$w("#html1").postMessage("yourmessage");}, 50);
}
If you don’t have the time to parse through all this, feel free to contact me.
UPDATE 4/1:
1.#Wixlocation seems to be buggy because there is flat-out no canonical url, which can result in some weird behavior highly dependent on where you are pointing your links. It’s also affecting buttons without code in some cases.
2.#WixData connections are still failing on a page loaded with a url query.
3. I’ve corrected all animations, and it’s no longer an issue for me.
4. HTML formatting is fine, just be careful with template literals using wixLocation for reason above.
5. This is the most annoying. I’ve tried everything I can while maintaining my desired style choices, but no go. Code once working for triggering multiple collapsed/hidden elements has just sh*t the bed.
6.#WixVideo seems to be fully functional again.
7.#iFrames I’ve been putting off on fixing, but I’m pinning what appears to be @tabraham 's very helpful answer from down below. Will update once I’ve tested:
Previously, the recommended practice was to wait for a onReady message from a iFrame HTML component before doing a postMessage to send data from the page code to the HTML component.
But now, it looks like Wix is no longer reloading iFrame Html Components on Dynamic Pages – as such the onMessage event is not triggered except for the first load of the Dynamc Page (something similar is perhaps going on for the rest of the issues).
So the fix is to directly call postMessage without waiting for an onMessage event as was the recommended practice.
UPDATE 3/29: More things are broken now.
Here’s what I’ve seen on my end:
- #Wixlocation.to seems to be breaking on some sites because urls have changed, but the API is still going by the old urls. This can be fixed by comparing the url you’re being directed to vs the working url and manually correcting.
- #WixData connections are breaking sporadically if you’ve connected through the GUI, while connections through the code seem to be much more reliable.
- Animations are breaking if you have a combination of GUI and code on the same element. Easily fixed by making them code only.
- The HTML/style formatting broke for a day before fixing itself.
- Still having problems with triggering collapsed/hidden elements with onClick, not sure what the problem is there yet.
- #WixVideo elements aren’t playing when dynamically connected through the GUI or through code. This was tested with uploaded media and Wix stock media.
- #iFrames on dynamic pages are not working currently.
I’m all for faster load speeds, but Wix needs to say something about this. Customers can’t be hung out to dry, especially if they don’t know how to fix these sorts of things on their own.