Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #1158783

    I have two sites running both the latest Enfold version: 4.6.3.1. One site uses a child theme, the other does not. The site without the child theme shows an update notfication. for the included LayerSlide plugin. I needed some custom coding to show the details, since the plugin does not show on the WP plugin page. How is it possible with two identical versions of the theme? What can I do about it. It’s not a major issue, but it is distracting.
    Thanks.

    • This topic was modified 5 years ago by DFME.
    #1159066

    Hey DFME,

    Can you try the solution posted in here: https://kriesi.at/support/topic/enfold-causes-wrong-update-markers/#post-1132470
    Hope it helps.

    Best regards,
    Nikko

    #1159149

    Hi,
    it does not work. It is stated clearly in that thread that the code snippet will supress ALL update notifications. That’s what it does in my installation. As others say, it’s not really a big issue. However, the phantom notification is a nuisance and should not appear in a premium theme like Enfold. At least, now I know why it does not show up on the other site: It’s deactivated in the theme options.
    Thanks, Mike

    • This reply was modified 5 years ago by DFME.
    #1159861

    Hi Mike,

    Can you try adding this php code in your child theme’s functions.php:

    function remove_ls_update_notification() {
    	return 'no';
    }
    
    add_filter('avf_show_layerslider_update_notification', 'remove_ls_update_notification');

    Hope it helps.

    Best regards,
    Nikko

    #1159864

    Hi Nikko,
    tried the snippet. Unfortunately, it didn’t change anything. The notification is still there.

    Thanks!
    Mike

    #1159907

    Hi DFME,

    I have tested the code I gave and it worked on my end.
    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( do be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.

    Best regards,
    Nikko

    #1160258

    Hi Nikko,
    please find the credentials in the private data section. We don’t use a child theme. Instead, we have a custom plugin called “Wartung”. Feel free to temporarily change the theme or the plugin. I tried your snippet in both the theme and and plugin with no luck.
    Thank you!
    Mike

    #1160308

    Hi DFME,

    Thanks for giving us access, it seems clean looking at the Updates panel or in the Plugins page, I was expecting it to look like this: https://imgur.com/1ruXHdz
    Can you give us an instruction on how we can see it or maybe a screenshot of the update notification?

    Best regards,
    Nikko

    #1160327

    Oh, I’m sorry. Update notifications are by default only visible by me. I’ve just disabled the function. You should now see the pending updates.

    #1160357

    Hi DFME,

    Thanks for doing that, I could see the update notifications but since theme editor is disabled, we could not inspect the code.
    Did you add the code in functions.php in the Enfold theme? can you create a staging site and give us ftp access to it? so we can try to tweak some files.

    Best regards,
    Nikko

    #1160454

    i try to use the filter too – experimenting with its use- but your code Nikko do not have effect on my installation too.

    #1160654

    Luckily, we have a staging server for this site. Please, see the private content for the credentials. Feel free to tweak some files.

    #1160854

    Hi DFME,

    Thanks, I tried to add this code (in functions.php) mentioned in this thread: https://kriesi.at/support/topic/site-still-showing-layerslider-needs-updating/#post-990227
    And it works on your site, please check:

    add_filter('site_transient_update_plugins', 'av_remove_ls_update_notification');
    function av_remove_ls_update_notification($value) {
    	if($value) {
    		unset($value->response[plugin_basename(__FILE__)]);
    		return $value;
    	}
    }


    @Guenni007
    can you try the same code if it does work on your end as well?

    Best regards,
    Nikko

    #1161047

    No, it does not work. Not even in on our staging server. Just go to Updates and reload. You will see the red circle, but no update showing in the panel. Please, see the screenshot:

    #1161099

    the site-transient-update-plugins does not work – on some places in internet i found this pre_site_transient_update_plugins
    The code which i try to use to only block layerslider update notification was:

    //Remove layerslider update nag
    function remove_ls_update_notification($value) {
    	if($value) {
    		unset($value->response['https://YOUR-DOMAIN/wp-content/themes/enfold/config-layerslider/LayerSlider/layerslider.php'] );
    		return $value;
    	}
    }
    add_filter('pre_site_transient_update_plugins', 'remove_ls_update_notification');

    or :

    function remove_ls_update_notification($value) {
    	if($value) {
    		unset($value->response['//'.$_SERVER['HTTP_HOST'].'/wp-content/themes/enfold/config-layerslider/LayerSlider/layerslider.php']);
    		return $value;
    	}
    }
    add_filter('pre_site_transient_update_plugins', 'remove_ls_update_notification');

    but it blocks all ( don’t know why) update-notifications.

    #1161714

    Hi DFME and Guenni007,

    I apologize for my mistake, the problem with it is the value we put inside $value->response (associative array) does not match which results to it returning null value and does not unset anything.
    I have tweaked the original code and it seems to work properly:

    add_filter('site_transient_update_plugins', 'av_remove_ls_update_notification');
    function av_remove_ls_update_notification($value) {
    	if( $value ) {
    
    		$layerslider = str_replace( '\\', '/', get_template_directory() . '/config-layerslider/LayerSlider/layerslider.php' );
    	
    		if( $layerslider[0] === '/') {
    			$layerslider = substr( $layerslider, 1 );
    		}
    
    		unset( $value->response[$layerslider] );
    		return $value;
    	}  
    }

    Here’s the screenshot in the staging site: https://imgur.com/uD6Hjtw


    @Guenni007
    can you check if this works on your end as well?

    Best regards,
    Nikko

    • This reply was modified 4 years, 11 months ago by Nikko.
    #1161794

    Hi Nikko,
    I can confirm that the updated code snippet is working perfectly. Thank you. this should be part of the theme core, since most users won’t have the time or experience to implement this solution. While this is really not a major issue, it’s quite distracting to see a plugin update notification without knowing where it comes from.
    Thanks, Mike

    #1161951

    Hi Mike,

    You’re welcome and thanks for confirming, will report this bug and the temporary fix to our devs. :)

    Best regards,
    Nikko

    #1162213

    By the way, will you integrate this function in the theme core? This would probably cause a conflict with the same function in the child theme and could break the site.

    #1162681

    Hi DFME,

    The code I gave uses a hook and not directly on the core file so it would be safe to use it even after the update.
    The fix that would most likely be implemented in the next version of Enfold would be: https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_6_3/layerslider/config.php

    Best regards,
    Nikko

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