wp-shortcake / shortcake-bakery

A fine selection of shortcodes for WordPress
42 stars 16 forks source link

Image Comparison shortcode JS error from WYSIWYG #214

Open mviggiano opened 6 years ago

mviggiano commented 6 years ago
juxtapose.js:248 Uncaught ReferenceError: jQuery is not defined
    at JXSlider.displayCredits (juxtapose.js:248)
    at JXSlider._init (juxtapose.js:387)
    at JXSlider._onLoaded (juxtapose.js:367)
    at Image.JXSlider.imgAfter.image.onload (juxtapose.js:170)

This looks like it's happening because jQuery is not being passed into / defined in the iframe that the shortcode lives in within the WYSIWYG. Updating the Juxtapose library to the newest version appeared to fix this when I tried it out (the jQuery dependency has been eliminated I believe), but resulted in some display issues in the post preview. This doesn't appear to cause any functionality issues, though; everything still works fine on the admin side. Curious as to whether folks see a clear fix for this or path forward.

davisshaver commented 6 years ago

@mviggiano Could you possibly confirm version of Shortcake Bakery and Shortcake are you using? I just tested on a master setup of both and things look okay at the minute, but there might be something else going on in my or your setup.