• Resolved SirLouen

    (@sirlouen)


    With the latest patch I’ve found that WP-Rocket JS combining/minification is conflicting with this plugin, more particularly with the su_image_carousel shortcode

    It shows everything right on desktop browser version, but in android chrome it breaks the whole page

    Here an URL for demo purposes
    https://theworldmarch.org/festival-por-paz-en-espacio-eva/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Vova

    (@gn_themes)

    Hi @sirlouen,

    what mobile device do you use?

    Thread Starter SirLouen

    (@sirlouen)

    I can also see this issue with the good Genymotion android emoulator
    Webview: https://i.imgur.com/Xhwx37y.png
    Google Chrome: https://i.imgur.com/PS5CYWW.png

    I have a Xiaomi Poco f1 anyway.

    I’ve also noticed that If I rescale the desktop browser to the mobile responsive m-query and refresh, it also gives the error.

    This is caught in the javascript log (with the Chrome Android inspector over ADB):
    Uncaught TypeError: Cannot read property ‘parentNode’ of null at 711344d….js:5 (the minified/combined WP-Rocket JS)

    .parentNode.removeChild(su_image_carousel_5d9875749ba78_script);

    I’m checking the code of includes/shortcodes/image-carousel.php

    And the problem is that this JS code is not only hardcoded but also inlined. Therefore, I’m stuck in the middle of nowhere when using su-carousel shortcode: I can’t exclude the JS file from WP-Rocket combination process and I can’t manipulate adequately that fragment of code because it doesn’t follow the WP guidelines.

    • This reply was modified 5 years ago by SirLouen.
    • This reply was modified 5 years ago by SirLouen.
    • This reply was modified 5 years ago by SirLouen.
    Plugin Author Vova

    (@gn_themes)

    The inline script is the only way I found to initialize the carousel if it’s loaded through AJAX (numerous themes and plugins). I never heard that inline scripts is a bad practice and isn’t allowed by WP coding standards. Please point me to a Codex page if I’m wrong.

    I made a small change that should fix the issue. It would be great if you test it, as I’m unable to reproduce the bug.

    Please download the image-carousel.php file and upload it to the /wp-content/plugins/shortcodes-ultimate/includes/shortcodes/ directory. The resulting path should be — /wp-content/plugins/shortcodes-ultimate/includes/shortcodes/image-carousel.php.

    Thank you in advance.

    Thread Starter SirLouen

    (@sirlouen)

    Ok, tested and now it seems to be solved ??

    Plugin Author Vova

    (@gn_themes)

    Great. Thanks for the report.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Issues with WP-Rocket’ is closed to new replies.