-
AuthorPosts
-
November 21, 2019 at 11:20 am #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.
November 22, 2019 at 11:16 am #1159066Hey 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,
NikkoNovember 22, 2019 at 2:05 pm #1159149Hi,
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.
November 25, 2019 at 2:02 pm #1159861Hi 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,
NikkoNovember 25, 2019 at 2:10 pm #1159864Hi Nikko,
tried the snippet. Unfortunately, it didn’t change anything. The notification is still there.Thanks!
MikeNovember 25, 2019 at 4:40 pm #1159907Hi 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.- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- 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 ). - Click ” Submit “.
- 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,
NikkoNovember 26, 2019 at 11:25 am #1160258Hi 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!
MikeNovember 26, 2019 at 1:21 pm #1160308Hi 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,
NikkoNovember 26, 2019 at 1:56 pm #1160327Oh, 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.
November 26, 2019 at 3:37 pm #1160357Hi 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,
NikkoNovember 26, 2019 at 9:00 pm #1160454i try to use the filter too – experimenting with its use- but your code Nikko do not have effect on my installation too.
November 27, 2019 at 3:13 pm #1160654Luckily, we have a staging server for this site. Please, see the private content for the credentials. Feel free to tweak some files.
November 28, 2019 at 3:13 am #1160854Hi 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,
NikkoNovember 28, 2019 at 4:49 pm #1161047No, 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:
November 28, 2019 at 8:29 pm #1161099the 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.
December 2, 2019 at 4:17 am #1161714Hi 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.
December 2, 2019 at 11:10 am #1161794Hi 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, MikeDecember 2, 2019 at 6:31 pm #1161951Hi Mike,
You’re welcome and thanks for confirming, will report this bug and the temporary fix to our devs. :)
Best regards,
NikkoDecember 3, 2019 at 2:47 pm #1162213By 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.
December 4, 2019 at 6:07 pm #1162681Hi 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.phpBest regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.