Viewing 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • #1277770

    Hi guys, the layer slider no longer works … In the section where it is posted, only a blank page is displayed.

    Can you help me please?

    Thank You

    #1277856

    Hi zibbaldone,

    Thanks for giving us admin access.
    I tried to check on your site however it seems jquery isn’t loaded, tweaking some settings does not seem to help.
    Can you try to reinstall WordPress then Enfold? also make a backup and disable the caching plugin before you reinstall.

    Best regards,
    Nikko

    #1278073

    Hello dear, thanks for the answer.
    I’m not an expert, I’ve never uninstalled WordPress or Enfold in my life. I’m afraid that doing this may cause other damage that I can’t solve.
    Do you have a guide in the case?
    Can we try something less invasive?
    Thank you.

    #1278245

    Hi,

    Thanks for the update. Please try installing this plugin: https://wordpress.org/plugins/enable-jquery-migrate-helper/, then set the jQuery version to 1.12.4 in the plugin option, to see if that helps.

    Best regards,
    Rikard

    #1278336

    Thank You for the reply.
    I installed the plugin but unfortunately nothing has changed …
    Are you planning to fix this in the next theme update? When will it happen?

    Thank you.

    #1278538

    Hi,

    Thanks for the update. What happens if you disable all plugins, to check for a conflict coming from any of them?

    Best regards,
    Rikard

    #1279822

    Hi,
    I tried to disable all plugins, but the mom slider is still visible.
    This makes me think that it is not the fault of a conflict between plugins ..
    Other solutions?

    #1280037

    **not visible

    #1280142

    Hi zibbaldone,

    Please disable images lazy loading and can you disable caching and minification for now?

    Best regards,
    Victoria

    #1280326

    I tried all your suggestions but nothing has changed … The layer slider is not visible, there is only a blank page.
    How can we solve it?

    #1281398

    Hi zibbaldone,

    Please disable the Total Cache Plugin and see if the issue gets resolved. JQuery is still not loading on that page.

    Best regards,
    Victoria

    #1281481

    Nothing change.

    #1281525

    Hi zibbaldone,

    Can you please keep it disabled for now for a bit?

    Best regards,
    Victoria

    #1281795

    Hi Victoria,

    I do it.
    How long do I have to keep the plugin deactivated?
    It has been disabled for 12 hours now and nothing has changed.
    Thank you

    #1281822

    Hi zibbaldone,

    Please disable Cloudflare too or exclude the jQuery from being served from the CDN.

    Best regards,
    Victoria

    #1281861

    Cloudflare now is disable!

    #1282074

    Hi zibbaldone,

    Thank you. The Layer Slider is rendering sliders on the page but they still do not work properly. I will ask my colleagues to have a look.

    Best regards,
    Victoria

    #1282240

    Thanks Victoria.
    I hope that the problem can be resolved as soon as possible.

    In your next theme update, will you update Layer Slider?
    I saw that other users have the same problem, maybe it will be solved with the theme update?

    #1283425

    Hi,

    Can we deactivate the plugins temporarily while checking the issue? The sliders are not displaying because according to the browser console, jQuery is not defined or is not loaded. We cannot reproduce the same issue on our end, so this is probably caused by a plugin or by a custom modification in the theme.

    Thank you for your patience.

    Best regards,
    Ismael

    #1283432

    Hi Ismael,I realized that the plugin was disabled :)
    Sure, go ahead!
    I had been trying to deactivate it and download Jquery migrate plugin … without getting results ..
    I also kept the plugin (W3 total cache) disabled for 48 hours ..
    Do you take the test now?
    Without the plugin my site’s performance is very low, so I hope you can fix it soon.

    Thanks so much!

    #1283647

    Hi!

    Thank you for the update.

    In your installation, we noticed that the layerslider jquery script has this attribute, which does not exists in our own installation.

    data-cfasync="false
    

    This was added using a filter, so we used this snippet in the functions.php file to register the scripts again and remove the data attribute.

    
    add_action("wp_enqueue_scripts", function() {
    	wp_deregister_script('layerslider' );
    	wp_deregister_script('layerslider-utils' );
    	wp_register_script('layerslider', LS_ROOT_URL.'/static/layerslider/js/layerslider.kreaturamedia.jquery.js', array('jquery'), LS_PLUGIN_VERSION, true );
    	wp_register_script('layerslider-utils', LS_ROOT_URL.'/static/layerslider/js/layerslider.utils.js', array('layerslider'), LS_PLUGIN_VERSION, true );
    }, 999);
    
    function avf_script_loader_tag_mod( $tag, $handle, $source ) {
        if ( "layerslider" === $handle || "layerslider-utils" === $handle ) {
    		$tag = str_replace( "data-cfasync=\"false\"", '', $tag );
        }
    
        return $tag;
    }
    add_filter( 'script_loader_tag', 'avf_script_loader_tag_mod', 999, 3);
    
    add_action("after_setup_theme", function() {
    	remove_filter('script_loader_tag', 'layerslider_script_attributes', 10, 3);
    }, 999);
    

    The jQuery errors are now gone, but the old sliders are still working properly. However, newly created sliders work just fine. Please check the private field.

    Cheers!
    Ismael

    #1283668

    Hello,
    I did a test, the default slides of the Layer slider plugin seem to work, but not the one I created customized.

    I don’t know what to say .. in the meantime I have to reactivate the plugins for the optimization of the site, because not I can keep it like this …

    Is it possible that your next update or something will fix it?

    #1283680

    UPDATE!!
    Now there is a serious error on my site, I have noticed it now, it is displayed at the top of all the pages of my site. It is an error in the php file, which appeared after last modification.

    I have disabled all plugins but the problem is not solved.

    Can you help me please?
    Thank you!

    Warning: Use of undefined constant LS_ROOT_URL – assumed ‘LS_ROOT_URL’ (this will throw an Error in a future version of PHP) in /home/customer/www/marcobizzarro.com/public_html/wp-content/themes/enfold/functions.php on line 846

    Warning: Use of undefined constant LS_PLUGIN_VERSION – assumed ‘LS_PLUGIN_VERSION’ (this will throw an Error in a future version of PHP) in /home/customer/www/marcobizzarro.com/public_html/wp-content/themes/enfold/functions.php on line 846

    Warning: Use of undefined constant LS_ROOT_URL – assumed ‘LS_ROOT_URL’ (this will throw an Error in a future version of PHP) in /home/customer/www/marcobizzarro.com/public_html/wp-content/themes/enfold/functions.php on line 847

    #1283681

    Hi!

    I did a test, the default slides of the Layer slider plugin seem to work, but not the one I created customized.

    Sorry about that. What happens when this part of the code is removed?

    add_action("wp_enqueue_scripts", function() {
    	wp_deregister_script('layerslider' );
    	wp_deregister_script('layerslider-utils' );
    	wp_register_script('layerslider', LS_ROOT_URL.'/static/layerslider/js/layerslider.kreaturamedia.jquery.js', array('jquery'), LS_PLUGIN_VERSION, true );
    	wp_register_script('layerslider-utils', LS_ROOT_URL.'/static/layerslider/js/layerslider.utils.js', array('layerslider'), LS_PLUGIN_VERSION, true );
    }, 999);
    

    Removing that part should also remove the errors and the script_loader_tag filter above should be enough to remove the data attribute.

    Best regards,
    Ismael

    #1283689

    Hi Ismael,

    how do i move the code?
    In which section can I find the form to make the correction?

    #1283743

    Please help me, i need to fix this error.
    I don’t know where to remove this code .. can you tell me where to go to remove the code?
    Thank you.

    #1283760

    Another update.

    The site was broken in several places, in addition to the error I wrote above that appeared above the menu at the top.

    Not being able to wait any longer, I restored a backup.

    Obviously layer Slider doesn’t work.
    But at least the site works without failure.

    #1283872

    Hi,

    The code that we suggested to remove is in the functions.php file, along with the snippet that we recommended previously. But since you already restored the site using a backup, please use this snippet in the functions.php file instead.

    function avf_script_loader_tag_mod( $tag, $handle, $source ) {
        if ( "layerslider" === $handle || "layerslider-utils" === $handle ) {
    		$tag = str_replace( "data-cfasync=\"false\"", '', $tag );
        }
    
        return $tag;
    }
    add_filter( 'script_loader_tag', 'avf_script_loader_tag_mod', 999, 3);
    
    add_action("after_setup_theme", function() {
    	remove_filter('script_loader_tag', 'layerslider_script_attributes', 10, 3);
    }, 999);
    

    Best regards,
    Ismael

    #1283892

    I know that the code was in thefuntions.php file.. My problem is that i don’t know where i can found the file functions.php…
    I can’t find it on wordpress .. I don’t know the location … I don’t know if I’ve made myself clear …

    #1283923

    Hey!

    Sorry for the confusion. We forgot that we were the one who added the snippet in the functions.php file. Did you try the updated code that we posted above? You should be able to edit the functions.php file in the Appearance > Editor panel, or via FTP if you already have a login account. If the Appearance > Editor panel is not accessible, we may need to modify the wp-config.php file. And for that, we really need an FTP account.

    Cheers!
    Ismael

Viewing 30 posts - 1 through 30 (of 30 total)
  • You must be logged in to reply to this topic.