W3 Total Cache Rotating Tweets = Not updating tweets?
-
First of all – great plugin! Thank you very much for it.
Now the problem – tweets are not updating but as admin while loading a non-cached version of the site – it works fine. I suppose it’s Total Cache.
So the stupid question is – how do I make it work? =)
-
OK. It’s working on my site! The version that works for me is the new development version. You’ll need to download and reinstall it.
The system now works with widgets and shortcodes.
How are you placing your plug-in on the page? Via shortcode or widget or hard-coded into the template?
If it’s still not working and there’s no difference in how you’ve installed it, we’ll need to compare Page Cache settings. Rotating Tweets is currently outputting a huge array of W3TC settings inside comments
<!-- // -->
which we may need to compare. Are you using enhanced or basic page caching?Martin
This new version works as long as I am logged in WordPress (loading a non cached version of the site). If I log out and do not flush the W3TC cache, the plugin rotates the tweets from the W3TC cache and does not update until W3TC cache is updated.
This behavior is the same with basic or enhanced caching (Late Init. enabled in basic).
I described an issue with enhanced vs basic caching here. I am not using the default W3TC settings – is there an easy way to grab a summary of the settings, because they are probably over 50… I’m using a shortcode placed in the header, with the settings I posted here.Do you have
WP_DEBUG
set totrue
?If you have then there is an enormous section of HTML in the source which lays out the W3TC settings. The source also tells you (immediately after the Rotating Tweets HTML) whether W3TC is using the fragment cache or not.
Martin
For reference, my
pgcache
settings are:[pgcache.enabled] => 1 [pgcache.comment_cookie_ttl] => 1800 [pgcache.debug] => [pgcache.engine] => file [pgcache.file.gc] => 3600 [pgcache.file.nfs] => [pgcache.file.locking] => [pgcache.lifetime] => 3600 [pgcache.memcached.servers] => Array ( [0] => 127.0.0.1:11211 ) [pgcache.memcached.persistant] => 1 [pgcache.check.domain] => [pgcache.cache.query] => 1 [pgcache.cache.home] => 1 [pgcache.cache.feed] => [pgcache.cache.nginx_handle_xml] => [pgcache.cache.ssl] => [pgcache.cache.404] => [pgcache.cache.flush] => [pgcache.cache.headers] => Array ( [0] => Last-Modified [1] => Content-Type [2] => X-Pingback [3] => P3P ) [pgcache.compatibility] => [pgcache.remove_charset] => [pgcache.accept.uri] => Array ( [0] => sitemap(_index)?\.xml(\.gz)? [1] => ([a-z0-9_\-]+)?sitemap\.xsl [2] => [a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)? ) [pgcache.accept.files] => Array ( [0] => wp-comments-popup.php [1] => wp-links-opml.php [2] => wp-locations.php ) [pgcache.accept.qs] => Array ( [0] => ) [pgcache.reject.front_page] => [pgcache.reject.logged] => 1 [pgcache.reject.logged_roles] => [pgcache.reject.roles] => Array ( [0] => ) [pgcache.reject.uri] => Array ( [0] => wp-.*\.php [1] => index\.php ) [pgcache.reject.ua] => Array ( [0] => ) [pgcache.reject.cookie] => Array ( [0] => wptouch_switch_toggle ) [pgcache.reject.request_head] => [pgcache.purge.front_page] => [pgcache.purge.home] => 1 [pgcache.purge.post] => 1 [pgcache.purge.comments] => [pgcache.purge.author] => [pgcache.purge.terms] => [pgcache.purge.archive.daily] => [pgcache.purge.archive.monthly] => [pgcache.purge.archive.yearly] => [pgcache.purge.feed.blog] => 1 [pgcache.purge.feed.comments] => [pgcache.purge.feed.author] => [pgcache.purge.feed.terms] => [pgcache.purge.feed.types] => Array ( [0] => rss2 ) [pgcache.purge.postpages_limit] => 10 [pgcache.purge.pages] => Array ( [0] => ) [pgcache.purge.sitemap_regex] => ([a-z0-9_\-]*?)sitemap([a-z0-9_\-]*)?\.xml [pgcache.prime.enabled] => [pgcache.prime.interval] => 900 [pgcache.prime.limit] => 10 [pgcache.prime.sitemap] => [pgcache.prime.post.enabled] =>
For reference, if the caching works, you should see:
<!-- Rotating Tweets W3TC Fragment Caching Success ! -->
somewhere in your HTML source.
As far as I can tell from reading comments, I think fragment caching only works with ‘Basic’ Page Caching. For some reason, I can’t switch on Enhanced Caching so can’t test it unfortunately. Which method are you using? Are you seeing
<!-- Rotating Tweets W3TC Fragment Caching Success ! -->
in your HTML source?If you are, then we may need to have the cached function take a more aggressive approach to updating the Tweets…
Martin
I’ve done a new version that is working for me – and loading new tweets much more frequently…
Martin
This is my page cache setup, taken from W3TC export configuration in general settings:
'pgcache.enabled' => true, 'pgcache.comment_cookie_ttl' => 1800, 'pgcache.debug' => false, 'pgcache.engine' => 'file', 'pgcache.file.gc' => 1800, 'pgcache.file.nfs' => true, 'pgcache.file.locking' => false, 'pgcache.lifetime' => 3600, 'pgcache.memcached.servers' => array( 0 => '127.0.0.1:11211', ), 'pgcache.memcached.persistant' => true, 'pgcache.check.domain' => false, 'pgcache.cache.query' => false, 'pgcache.cache.home' => true, 'pgcache.cache.feed' => true, 'pgcache.cache.nginx_handle_xml' => true, 'pgcache.cache.ssl' => true, 'pgcache.cache.404' => true, 'pgcache.cache.flush' => false, 'pgcache.cache.headers' => array( 0 => 'Last-Modified', 1 => 'Content-Type', 2 => 'X-Pingback', 3 => 'P3P', ), 'pgcache.compatibility' => false, 'pgcache.remove_charset' => false, 'pgcache.accept.uri' => array( 0 => 'sitemap(_index)?\\.xml(\\.gz)?', 1 => '[a-z0-9_\\-]+-sitemap([0-9]+)?\\.xml(\\.gz)?', ), 'pgcache.accept.files' => array( 0 => 'wp-comments-popup.php', 1 => 'wp-links-opml.php', 2 => 'wp-locations.php', ), 'pgcache.accept.qs' => array( 0 => '', ), 'pgcache.reject.front_page' => false, 'pgcache.reject.logged' => true, 'pgcache.reject.logged_roles' => false, 'pgcache.reject.roles' => array( 0 => '', ), 'pgcache.reject.uri' => array( 0 => 'wp-.*\\.php', 1 => 'index\\.php', ), 'pgcache.reject.ua' => array( 0 => '', ), 'pgcache.reject.cookie' => array( 0 => 'wptouch_switch_toggle', ), 'pgcache.reject.request_head' => false, 'pgcache.purge.front_page' => false, 'pgcache.purge.home' => true, 'pgcache.purge.post' => true, 'pgcache.purge.comments' => false, 'pgcache.purge.author' => false, 'pgcache.purge.terms' => false, 'pgcache.purge.archive.daily' => false, 'pgcache.purge.archive.monthly' => false, 'pgcache.purge.archive.yearly' => false, 'pgcache.purge.feed.blog' => true, 'pgcache.purge.feed.comments' => false, 'pgcache.purge.feed.author' => false, 'pgcache.purge.feed.terms' => false, 'pgcache.purge.feed.types' => array( 0 => 'rss2', ), 'pgcache.purge.postpages_limit' => 10, 'pgcache.purge.pages' => array( 0 => '', ), 'pgcache.purge.sitemap_regex' => '([a-z0-9_\\-]*?)sitemap([a-z0-9_\\-]*)?\\.xml', 'pgcache.prime.enabled' => true, 'pgcache.prime.interval' => 1800, 'pgcache.prime.limit' => 10, 'pgcache.prime.sitemap' => '/sitemap_index.xml', 'pgcache.prime.post.enabled' => true,
I don’t see a success string – should debug be on for that to appear?
This new version does not show up at all, just like it happened before.What HTML is appearing on the source page?
What is the exact PHP you use to display the Tweets and which file have you put it in? Or are you entering it as a standard code or widget?
I’ve uploaded a version that doesn’t require
WP_DEBUG
to be set toTRUE
before showing the message – although ifWP_DEBUG
is true you will get a lot more diagnostics to help solve the problem.Martin
OK. Are you using a function to call the HTML or is it in a post?
Is it in a template file?
Does the caching work if you use a widget or a shortcode in a post?
Martin
Been looking at W3TC code. Apparently browser compression will also break the functionality…
The two variables to look out for are:
browsercache.enabled browsercache.html.compression
I’ve updated the code to reflect this.
PS: You don’t need to set
WP_DEBUG
to see diagnostics now. If W3TC is set for debugging (on the Page Cache settings page) then Rotating Tweets will respect that too.This is the page cache debugging.
<!-- W3 Total Cache: Page cache debug info: Engine: disk Cache key: Caching: enabled Status: cached Creation Time: 0.699s Header info: Last-Modified: Sun, 12 Oct 2014 22:08:19 GMT Expires: Sun, 12 Oct 2014 22:38:19 GMT Pragma: public Cache-Control: max-age=1605, public, must-revalidate, proxy-revalidate X-Powered-By: W3 Total Cache/0.9.4 X-Pingback: https://www.name.com/xmlrpc.php Content-Type: text/html; charset=UTF-8 -->
This new version of the plugin shows up but does not refresh independently from the W3TC – bot as a shortcode in a post or in the header.php. I can not test it as a widget at this moment.
I am not sure how to get an answer for the rest of your questions.
Are you using a function to call the HTML or is it in a post?
Is it in a template file?
Hmmm. This is very puzzling.
Do you have the latest development version (from about 2 hours ago)?
Can you confirm that there is no HTML such as:
<!-- Rotating Tweets W3TC Fragment Caching: Start Diagnostics -->
or
<!-- Rotating Tweets W3TC Fragment Caching: Success ! -->
anywhere on the page?
In theory, the only way they wouldn’t be appearing is if
W3TC_DYNAMIC_SECURITY
was not defined or W3TC is not enabled…
- The topic ‘W3 Total Cache Rotating Tweets = Not updating tweets?’ is closed to new replies.