WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Issue with Scheduled Posts Not Showing Up (44 posts)

  1. icemonkey9
    Member
    Posted 1 year ago #

    I've tried doing some research and right now I'm just fumbling around looking for an explanation. This isn't your typical "missed scheduled" error.

    What happens: I schedule a post in the future. It doesn't show up on the site. I go into the dashboard and it says it posted, but even if I refresh (dumping browser cache) it still doesn't show up. Then I go into the post, hit "update" and it *then* magically appears on the site.

    Maybe it's a caching issue? Now that I write it out I doubt it but I'll take all the help I can get. I don't think the WP Missed Schedule plugin will help because it never says missed schedule. Just taking a stab that it might be a cache config?

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    You should probably enable the debug log and watch it when the scheduled post is supposed to publish. It should report that the plugin is deleting the front page and other cached files.

  3. sephage
    Member
    Posted 1 year ago #

    I'm having a similar issue after installing 1.1. I've reverted back to 1.0 and will see if that helps.

    What happens is that the scheduled post gets created, but the homepage cache isn't cleared so the new pos isn't visible on the homepage. For some reason this also causes the rss feed not to update & kills the automation of the site's XML for google as well.

  4. icemonkey9
    Member
    Posted 1 year ago #

    sephage - confirmed. I killed the plugin and all problems went away. I'd be interested to hear if there are any issues using the legacy 1.0. Thanks for confirming I wasn't crazy. Any way to get feedback to the devs so a fix can be made?

  5. FCGrabo
    Member
    Posted 1 year ago #

    Same issue for me. I schedule posts for around 7am the following day. On that day with a fresh browser, the posts are not there.

    I clear the cache from Super Cache and then the posts appear.

    Wasn't WP-SuperCache updated not too long ago?

  6. sephage
    Member
    Posted 1 year ago #

    All - I can confirm that reverting back to 1.0 resolved this for me at 1WineDude.com (including reverting the .htaccess mod rewrite rules just in case they were different).

    Not sure what is going on but I don't have time to debug it right now so reverting and ignoring updates on WPSC until there's more time for Donncha to review/test/sort it out.

  7. qaws
    Member
    Posted 1 year ago #

    I have exactly this - updated from 1.0 to 1.1 and now the cache is not cleared whenever a scheduled post is published (and I do have the "Clear all cache files when a post or page is published or updated" option enabled). I've changed no settings at all since upgrading, and now I need to manually clear my cache each morning.

  8. eric-o
    Member
    Posted 1 year ago #

    Thank you all for posting this. I had same problem...it worked again after reverting to 1.0. When I enabled debugging, i was seeing two strange things:

    1) on the browser I had that had a valid login cookie, doing a refresh of the homepage caused it to load a random post, unrelated to the home page

    2) on the browser I had that wasn't logged in, a refresh did nothing that was reflected in the debugging log.

    So back to 1.0 for now! Please tell me if i can be of further help.

    -eric

  9. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    I tested this by scheduling a post and it worked fine. I enabled the debug log first and at 11:45am when I scheduled it there was a call to wp-cron.php and I saw this log entry:

    Clearing cache for post 89497576 on post edit

    And afterwards it logged that it was "clearing cache in" various directories.
    I checked wp-content/cache/supercache/ocaoimh.ie/ and yes, the index.html and index.html.gz had a timestamp at 10:45am (Summer time vs UTC) which was correct.

    That's basically all I'm asking you to do if you have a problem with scheduling posts. Please try the debug log. If you want to send me the debug log then don't send me reams of stuff. I won't look at it. Edit the log and limit it to the scheduled time. Paste the log into http://pastebin.com/ and post the resulting URL to this thread.

  10. acrain
    Member
    Posted 1 year ago #

    Donncha,
    Does this help? I posted this elsewhere before noticing this thread.

    Like others here, scheduled posts are successfully published, but they don't seem to trigger a clearing of the cache:

    A post was scheduled to publish at 16:31:00, and did publish then. It could be accessed directly, but the main/index page was not updated/cleared.

    16:28:08 /crain/wpsc11/wp-admin/edit.php Cookie detected: wordpress_logged_in_8530db1c189dc0fb8e3bf9a6bf8742e4
    16:28:08 /crain/wpsc11/wp-admin/edit.php supercache dir: /#####/crain/wpsc11/wp-content/cache/supercache/####/crain/wpsc11/wp-admin/edit.php/
    16:28:08 /crain/wpsc11/wp-admin/edit.php No wp-cache file exists. Must generate a new one.
    16:28:08 /crain/wpsc11/wp-admin/edit.php Cookie detected: wordpress_logged_in_8530db1c189dc0fb8e3bf9a6bf8742e4
    16:28:08 /crain/wpsc11/wp-admin/edit.php In WP Cache Phase 2
    16:28:08 /crain/wpsc11/wp-admin/edit.php Setting up WordPress actions
    16:28:08 /crain/wpsc11/wp-admin/edit.php Not caching wp-admin requests.
    16:28:09 /crain/wpsc11/wp-admin/admin-ajax.php Cookie detected: wordpress_logged_in_8530db1c189dc0fb8e3bf9a6bf8742e4
    16:28:09 /crain/wpsc11/wp-admin/admin-ajax.php In WP Cache Phase 2
    16:28:09 /crain/wpsc11/wp-admin/admin-ajax.php Setting up WordPress actions
    16:28:09 /crain/wpsc11/wp-admin/admin-ajax.php Not caching wp-admin requests.
    16:32:44 /crain/wpsc11/wp-admin/edit.php Cookie detected: wordpress_logged_in_8530db1c189dc0fb8e3bf9a6bf8742e4
    16:32:44 /crain/wpsc11/wp-admin/edit.php supercache dir: /#####/crain/wpsc11/wp-content/cache/supercache/####/crain/wpsc11/wp-admin/edit.php/
    16:32:44 /crain/wpsc11/wp-admin/edit.php No wp-cache file exists. Must generate a new one.
    16:32:44 /crain/wpsc11/wp-admin/edit.php Cookie detected: wordpress_logged_in_8530db1c189dc0fb8e3bf9a6bf8742e4
    16:32:44 /crain/wpsc11/wp-admin/edit.php In WP Cache Phase 2
    16:32:44 /crain/wpsc11/wp-admin/edit.php Setting up WordPress actions
    16:32:44 /crain/wpsc11/wp-admin/edit.php Not caching wp-admin requests.
    16:32:44 /crain/wpsc11/wp-cron.php?doing_wp_cron=1338913964 In WP Cache Phase 2
    16:32:44 /crain/wpsc11/wp-cron.php?doing_wp_cron=1338913964 Setting up WordPress actions
    16:32:44 /crain/wpsc11/wp-cron.php?doing_wp_cron=1338913964 Not caching POST request.
    16:32:45 /crain/wpsc11/wp-cron.php?doing_wp_cron=1338913964 wp_cache_post_edit: draft post, not deleting any cache files.
    16:32:45 /crain/wpsc11/wp-cron.php?doing_wp_cron=1338913964 wp_cache_post_change: draft post, not deleting any cache files.
    16:32:45 /crain/wpsc11/wp-cron.php?doing_wp_cron=1338913964 wp_cache_post_edit: draft post, not deleting any cache files.

    Thanks very much!

  11. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    There's something odd there. The wp_cron process thought the post was a "draft post" so it didn't delete any cache files! I'm not sure how that would happen tbh. :(

  12. acrain
    Member
    Posted 1 year ago #

    Donncha,
    Could it be that GC kicks in a moment too soon, somehow, before the post status goes from "future" to "publish" and so mistaking it as a draft? Just a guess, as I'm not familiar with the internals.
    Thanks,
    Andy

  13. jclandin
    Member
    Posted 1 year ago #

    Donncha,

    It happens the same to me since v1.1. If I see the homepage of my blog automatically logged in as an admin user, the last scheduled posts appear. I try to see the blog with another browser that don't log into Wp-admin automatically and the last scheduled posts are missing.

    Then I clear caché and the posts appear in both browsers, logged in and not logged in. It seems v1.1 only regenerates caché for logged in users.

    Hope it helps,
    JC

  14. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    jclandin - enable the debug log just before you publish something and see what files are deleted. If you want, post just the logs from around the publish time to pastebin.com and post the url here.

  15. CldSwm
    Member
    Posted 1 year ago #

    Any update on this bug? I'm having the same issue since the 1.1 upgrade. If it's not going to be fixed soon I'd like to downgrade to 1.0 because scheduled posts are an integral part of our site. To downgrade, is there anything I need to do besides deactivate the plugin and then replace the 1.1 folder with the 1.0 folder and then reactivate?

    Thanks!

  16. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    CldSwm - can you try debugging your site, and examine the logs when you publish and when the post is supposed to go live? You should see an entry for wp-cron.php in a similar manner to described above. Thanks.

  17. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    Or email me at donncha @ ocaoimh.ie giving me a login/password to your site (ftp and WordPress) so I can debug it myself. Could be another plugin that's causing the status to be draft.

  18. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    Have you tried the development version? http://downloads.wordpress.org/plugin/wp-super-cache.zip

  19. sephage
    Member
    Posted 1 year ago #

    I'd be very interested in seeing if the Dev version helps correct this, so anyone trying it please post!

    @CldSwm - If reverting to 1.0 (I did the same), I'd make sure that you also replace the .htaccess rewrite rules (if using the advanced caching mode) just in case.

  20. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    I suspect this might be related to the introduction of a new filter I used to clear the cache and the function that does the clearing checked if it had been called twice.

    I have made a change to the plugin. You can either:
    1. Edit wp-content/plugins/wp-super-cache/wp-cache-phase2.php in your favourite text editor and remove the line that mentions "clean_post_cache"
    add_action( 'clean_post_cache', 'wp_cache_post_edit' );
    2. Download the development version and overwrite all the files in wp-content/plugins/wp-super-cache/ with those files.

    If you update to the dev version that filter is still there because it's a regular part of WordPress, but I moved the "check if it runs twice" bit of code around so it only checks after a post is published. If it's a draft post then it doesn't remember that run. Confused? Just try it and tell me if it helps please.

  21. acrain
    Member
    Posted 1 year ago #

    Donncha,
    Thanks for tracking this down. The fix works. On the same test installation where I experienced the problem with 1.1, I removed 1.1 and installed the dev version. Now, when a scheduled post is published via wp-cron, the cache is cleared as expected. Here's a log excerpt:

    16:05:38 /...wp-admin/plugins.php Not caching wp-admin requests.
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 In WP Cache Phase 2
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 Setting up WordPress actions
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 Not caching POST request.
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 wp_cache_post_edit: draft post, not deleting any cache files.
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 wp_cache_post_change: draft post, not deleting any cache files.
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 wp_cache_post_edit: Clearing cache for post 16 on post edit.
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 supercache dir: /...wp-content/cache/supercache/.../2012/06/21/scheduled-to-publish-62112-at-1205-p-m-edt/
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 wp_cache_post_id_gc post_id: 16 http://.../...2012/06/21/scheduled-to-publish-62112-at-1205-p-m-edt/ clearing cache in /...wp-content/cache/supercache/.../2012/06/21/scheduled-to-publish-62112-at-1205-p-m-edt/.
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 wp_cache_post_id_gc clearing cache in /...wp-content/cache/supercache/.../2012/06/21/scheduled-to-publish-62112-at-1205-p-m-edt//page/.
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 wp_cache_post_id_gc clearing cache in /...wp-content/cache/supercache/.../.../page/.
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 Post change: deleting cache files in /...wp-content/cache/supercache/.../...
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 prune_super_cache: wp_cache_rebuild_or_delete( /...wp-content/cache/supercache/.../...index.html )
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 rebuild_or_gc: rename to /...wp-content/cache/supercache/.../...index.html.needs-rebuild
    16:05:39 /...wp-cron.php?doing_wp_cron=1340294738 wp_cache_post_edit: draft post, not deleting any cache files.
    16:05:59 /... supercache dir: /...wp-content/cache/supercache/.../...
    16:05:59 /... No wp-cache file exists. Must generate a new one.
    16:05:59 /... In WP Cache Phase 2
    16:05:59 /... Setting up WordPress actions
    16:05:59 /... Created output buffer
    16:05:59 /... Rebuild file renamed to cache file temporarily: /...wp-content/cache/supercache/.../...index.html
    16:06:00 /...wp-cron.php?doing_wp_cron=1340294759 In WP Cache Phase 2
    16:06:00 /...wp-cron.php?doing_wp_cron=1340294759 Setting up WordPress actions
    16:06:00 /...wp-cron.php?doing_wp_cron=1340294759 Not caching POST request.
    16:06:00 /... Output buffer callback
    16:06:00 /... Anonymous user detected. Only creating Supercache file.
    16:06:00 /... Writing non-gzipped buffer to supercache file.
    16:06:00 /... Renamed temp supercache file to /...wp-content/cache/supercache/.../...index.html
    16:06:00 /... Sending buffer to browser
    16:06:00 /... wp_cache_shutdown_callback: collecting meta data.
    16:06:00 /... Did not write meta file: wp-cache-3602706326b6e23414dfaba913b8bd78.meta *1* *0* *1*

    Thank you.

  22. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    It's really weird. The clearing functions see a draft post but the second time they run they see a published post. Really odd but glad this fixes it. Expect a new release soon!

  23. acrain
    Member
    Posted 1 year ago #

    Donncha,
    Bonus points to you, as this fix appears to resolve the other issue I experienced with 1.1, where requests not desiring compression would nevertheless get gzipped responses (request headers lacking an accept-encoding:gzip header would still get gzipped output--see href="http://wordpress.org/support/topic/plugin-wp-super-cache-gzip-bug).

    Now compressed content is returned only if a client says it's OK to:

    $ wget --header="accept-encoding: gzip" -S -O wpsc11.html http://####/crain/wpsc11/feed/
    --2012-06-21 15:03:03--  http://####/crain/wpsc11/feed/
    Resolving #### (####)... ####
    Connecting to #### (####)|####|:80... connected.
    HTTP request sent, awaiting response...
      HTTP/1.1 200 OK
      Date: Thu, 21 Jun 2012 19:03:04 GMT
      Server: Apache
      X-Powered-By: PHP/5.3.3
      Content-Encoding: gzip
      Vary: Accept-Encoding,Cookie
      X-Pingback: http://####/crain/wpsc11/xmlrpc.php
      ETag: "1d7e411dd3ae8bf6be9d96dd8d6b17a0"
      WP-Super-Cache: Served legacy cache file
      Wx: 3
      Content-Length: 1166
      Keep-Alive: timeout=15, max=100
      Connection: Keep-Alive
      Content-Type: text/xml; charset=UTF-8
    Length: 1166 (1.1K) [text/xml]
    Saving to: 'wpsc11.html'
    
    100%[=======================================================================================>] 1,166       --.-K/s   in 0s      
    
    2012-06-21 15:03:03 (11.1 MB/s) - 'wpsc11.html' saved [1166/1166]
    
    $ file wpsc11.html
    wpsc11.html: gzip compressed data, from Unix
    
    $ wget -S -O wpsc11.html http://####/crain/wpsc11/feed/
    --2012-06-21 15:03:21--  http://####/crain/wpsc11/feed/
    Resolving #### (####)... ####
    Connecting to #### (####)|####|:80... connected.
    HTTP request sent, awaiting response...
      HTTP/1.1 200 OK
      Date: Thu, 21 Jun 2012 19:03:22 GMT
      Server: Apache
      X-Powered-By: PHP/5.3.3
      Vary: Cookie
      X-Pingback: http://####/crain/wpsc11/xmlrpc.php
      ETag: "1d7e411dd3ae8bf6be9d96dd8d6b17a0"
      WP-Super-Cache: Served legacy cache file
      Wx: 8
      Content-Length: 6540
      Keep-Alive: timeout=15, max=100
      Connection: Keep-Alive
      Content-Type: text/xml; charset=UTF-8
    Length: 6540 (6.4K) [text/xml]
    Saving to: 'wpsc11.html'
    
    100%[=======================================================================================>] 6,540       --.-K/s   in 0s      
    
    2012-06-21 15:03:21 (82.2 MB/s) - 'wpsc11.html' saved [6540/6540]
    
    $ file wpsc11.html
    wpsc11.html: XML document text

    Very happy about this! Thanks!

  24. artesea
    Member
    Posted 1 year ago #

    Have had the same issue reported to me from readers, the site auto tweets new posts, yet people visiting the home page couldn't find them.
    Turned on debugging on a post I just scheduled and got the same issue with post is draft do nothing.
    About to install the dev version.

  25. Doc75
    Member
    Posted 1 year ago #

    Hi, just to say that I'm having the same issue on both my blogs where I use WP Super Cache.
    I've just edited the wp-cache-phase2 file, I hope this should solve the problem.

    Thanks!

  26. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    Doc75 - or try the development version, that should fix it and I'd love to get some feedback, artesea - did it help?

    http://ocaoimh.ie/the-development-version-of-wp-super-cache/

  27. tbadorrek
    Member
    Posted 1 year ago #

    I'm having this same problem on a blog that receives a lot of views. Is there somewhere that I can download v.1.0 to revert to?

    Not comfortable using the aforementioned hack or a dev version--need stability.

    Thanks!

  28. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    tbadorrek - the dev version will be the stable version in a day or two, it is very stable.

  29. Doc75
    Member
    Posted 1 year ago #

    Hi, editing the file did not solve the problem. I'm now installing the development version.
    I'll let you know.

    Thanks.

  30. tbadorrek
    Member
    Posted 1 year ago #

    Editing the file did not work for me either.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic