• Resolved blazer380

    (@blazer380)


    I’m using Crocoblock Jet Elements, latest version and the Testimonials widget doesn’t load if Page scroll to id is active. Can you please see what the issue might be.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 16 through 19 (of 19 total)
  • Plugin Author malihu

    (@malihu)

    I’m gonna mark this as resolved but let me know if you need more help.

    Hi!

    I’m trying to make your plugin work with Rocket Loader + Elementor + Jet

    With this functions.php:

    function add_cfasync_attribute( $tag, $handle ) {
    
        // add script handles to the array below
        $scripts_cfasync = array(
            'jquery-core',
    		'page-scroll-to-id-plugin-script',
        );
    
        foreach ( $scripts_cfasync as $cfasync_script ) {
            if ( $cfasync_script === $handle ) {
                return str_replace( ' src', ' data-cfasync="false" src', $tag );
            }
        }
    
        return $tag;
    }
    add_filter( 'script_loader_tag', 'add_cfasync_attribute', 10, 2 );

    I choose which scripts will be ignored by Rocket Loader;
    But it didn’t work 100% yet, this error is appearing in the console:

    https://i.postimg.cc/PqthHgLq/image.png

    Before this Snippet, the page loaded normally, but the Elementor Popups didn’t work, and no errors appeared in the console. I put this Snippet and the popups started working again, only the error appeared. Can we adjust how?

    Plugin Author malihu

    (@malihu)

    @ofmarconi Hi,

    The plugin’s main script (“page-scroll-to-id-plugin-script”) gets its options via a WordPress localized script (wp_localize_script) which has the mPS2id_params variable.

    “page-scroll-to-id-plugin-script” needs to be registered/enqueued before calling the wp_localize_script and it seems that the custom filter you added messes with this (that’s why the missing mPS2id_params variable error).

    Rocket loader should have an exception/ignore option list, correct? Can you use it instead of the filter?

    Alternatively, maybe try removing the ‘page-scroll-to-id-plugin-script’ from the $scripts_cfasync array and leave only the jquery.

    Also, do you have “Prevent other scripts from handling plugin’s links” option enabled in plugin settings? If yes, try disabling it.

    Thank you, got it!

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Issue with JetElements Testimonials’ is closed to new replies.