I started using the social counters in the Newspaper theme. The Instagram counter is not updating. It’s stuck at 1750 followers. I have 2437. I cleared cache, tried different browsers but it is still not updating. My theme is up to date at 8.7.4. The counter works in my staging environment.
Works:
https://vrfitness.staging.wpengine.com/
Does not:
https://www.vrfitnessinsider.com/
Please advise how to fix.
Thanks!
Hi,
@amazingpaleo The ID seems to work when I test it (latest theme version used)
– https://www.screencast.com/t/GcG2m6DS99N
Maybe you use a caching plugin or implementation, or use CDN to serve theme files. Clear and purge all of these if that is the case. It is unusual however that all the other socials display accurate counts, and only Instagram is broken for you. Try changing the ID to something else, like this for example
– https://www.screencast.com/t/TXdU1T6Nhz
Then switch back to your ID, see if this helps.
No CDN and I cleared cache with wpengine. I contacted them and here is the conversation we had. It looks like the code base is different but my stage environment is a copy of production.
WPENGINE:
I apologize for the confusion. Looking at vrfitness, it looks like it’s using td-social-counter. Since clearing the cache did not resolve the issue I ran a check to compare the differences between staging and live. It does look like there are multiple differences . One is related to the td social widget, it appears tha there is code in the widget that is blocking it. It says the following: > // register our widget
> add_action(‘widgets_init’, ‘td_load_widget’);
> function td_load_widget() {
> $td_block_widget = new td_block_widget( ‘td_block_social_counter’ );
> register_widget( $td_block_widget );
11d12
< add_action(‘widgets_init’, create_function(”, ‘return register_widget(“td_block_social_counter_widget”);’));
I would recommend reaching out to the plug-in developer with this information as it appears something within the plugin is actually blocking it. From reading the error, it appears that it’s related to registration of the widget.
Shane Hoalst
That is weird… It’s part of the theme. Why would it work in stag but not prod?
Read
Andy
4:10 pm
Because the file is different. In live the file /nas/content/staging/vrfitness/wp-content/plugins/td-social-counter/widget/td_block_social_counter_widget.php
states ” < //register our widget
< class td_block_social_counter_widget extends td_block_widget {
< var $td_block_id = ‘td_block_social_counter’; // change only the block id, the rest is autogenerated”
In staging it says: > // register our widget
> add_action(‘widgets_init’, ‘td_load_widget’);
> function td_load_widget() {
> $td_block_widget = new td_block_widget( ‘td_block_social_counter’ );
> register_widget( $td_block_widget );
11d12
< add_action(‘widgets_init’, create_function(”, ‘return register_widget(“td_block_social_counter_widget”);’));
4:12 pm
SO there are additional lines in staging that are allowing the widget to load. As these are code snippets, I wouldn’t be able to alter them. Likely you will need to reach out to a developer, or the theme developer to update the code within this file so that the site will load. As I’m not a developer I can’t say for sure what this code is meant for but due to the contents I believe this is what’s causing it to fail to work on live.
@amazingpaleo Please first check if the social counter plugin is the latest version 4.4. If it is and the problem continues, send us an email at contact@tagdiv.com and provide admin login, we will take a look. Include a link to this topic in the email.