You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there!
I've been struggling for over 2 days until I saw PageSpeed adding code to the HTML code (I'm debugging a Plesk server not administrated by myself). PageSpeed adds code to the HTML page that uses the img.onload event to ensure image is loaded and probably other stuff. It breaks Unite Gallery making it raise the infamous Uncaught Error: The item should not be image type. I don't think UniteGallery should do a correction, but it could be done.
I've found that the problem is raised in a race condition, when the gallery constructor is called before all images are completely loaded. To avoid this race condition (as a workaround), I call the gallery constructor after all images are 100% loaded:
Hello there!
I've been struggling for over 2 days until I saw PageSpeed adding code to the HTML code (I'm debugging a Plesk server not administrated by myself). PageSpeed adds code to the HTML page that uses the
img.onload
event to ensure image is loaded and probably other stuff. It breaks Unite Gallery making it raise the infamous Uncaught Error: The item should not be image type. I don't think UniteGallery should do a correction, but it could be done.I've found that the problem is raised in a race condition, when the gallery constructor is called before all images are completely loaded. To avoid this race condition (as a workaround), I call the gallery constructor after all images are 100% loaded:
Hope it helps to others having this issue.
Edit: Found a link of people with same issue: https://valiano.ticksy.com/ticket/706985
The text was updated successfully, but these errors were encountered: