• Resolved Kimberly

    (@kellogg9)


    Anyone notice that SCHEDULED POSTS for WordPress never trigger this plugin to update the existing home page? I mean that “Enable Dynamic Cache Pruning Routines” seems like it is worthless for “Front Page + Single Page” option. I have always wondered why that is for all these years i’ve used it.

    Any fixes in the works? Or am i doing something wrong??

    https://www.ads-software.com/extend/plugins/quick-cache/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi Kellogg,

    It seems this has been a known issue for over a year. It also affects the Quick Edit functionality too.

    I have switched to using WP Super Cache it supports 3.4.2

    Jeff

    Thread Starter Kimberly

    (@kellogg9)

    Ok i solved it…Had a look in his code…

    For those having the same problem all you need to do is go to the plugins “quick-cache/includes/” folder and open the “hooks.inc.php” file and add this line:

    add_action ("publish_future_post", "c_ws_plugin__qcache_clearing_routines::clear_on_post_page_creations_deletions");

    Hi Kell,

    I have made your recommended changes, but I’m still having the same problem. Although NOW, if I log into the dashboard and simply click on the post title, it clears the cache. But the schedule doesn’t seem to do this automatically.

    Did you make any other tweaks or adjustments to your Quick-Cache config?

    Did you add this change to the TOP of your hooks file or somewhere in the middle?

    Tnx.

    Thread Starter Kimberly

    (@kellogg9)

    Hi Jeff…my apologies for not taking the time to properly answer. I wasn’t entirely sure if anyone would bother to read it so i never actually looked into my fixes but instead just posted what i recalled from memory.

    Any who, i pulled up the changes and to save time just modify your hooks.inc.php and clearing-routines.inc.php files to the ones in this zip: https://speedy.sh/VQRv4/QuickCache-FixSchedule.zip

    However, to preemptively alleviate concerns of future readers who will inevitably freak out because of not knowing what mischief voodoo I am doing in that zip file here are the manual steps:

    hooks.inc.php:
    (located under: /quick-cache/includes/)

    1. Look for the line:

    add_action ("save_post", "c_ws_plugin__qcache_clearing_routines::clear_on_post_page_creations_deletions");

    2. Replace it with the following lines:

    add_action ("publish_post", "c_ws_plugin__qcache_clearing_routines::clear_on_post_page_creations_deletions");
    add_action ("publish_page", "c_ws_plugin__qcache_clearing_routines::clear_on_post_page_creations_deletions");
    add_action ("publish_future_post", "c_ws_plugin__qcache_clearing_routines::for_future_posts");

    Note: I didn’t have to remove the save_post line (#1 above) but did so anyway because the save_post action gets triggered even in cases when you simply jump to the admin Post > Add New page without actually creating a post. Seems quite silly since it now can potentially require your Front Page to be cleared and re-cached for no reason — more CPU time == Bad. Logically the action to trigger Quick Cache should happen when the new post is actually published (or edited). Hence, why i replaced/removed the save_post line above. You can leave the line alone (dont have to remove/replace it). However, if you do keep it then you don’t need the publish_post and publish_page lines above (shown in #2) since save_post encapsulates them both.

    clearing-routines.inc.php:
    (located under: /quick-cache/includes/classes/)

    1. Add the following new function inside the class c_ws_plugin__qcache_clearing_routines (after line 18)

    public static function for_future_posts($id = FALSE)
    {
         c_ws_plugin__qcache_clearing_routines::clear_on_post_page_creations_deletions($id, TRUE);
    }

    2. Look for the line:

    if (is_blog_admin () && in_array ($pagenow, ($pages = array ("edit.php", "post.php", "post-new.php"))))

    3. Replace it with the following line:

    if ($isfuture || (is_blog_admin () && in_array ($pagenow, ($pages = array ("edit.php", "post.php", "post-new.php")))))

    Jeff

    (@jwb10600)

    GREAT! Thank you SO much for the follow-up. I think Quick-Cache is the fastest out there and this fix is just what the Dr. ordered.

    I’ll give it a try and let you know how it goes.

    Again.. Thank you for your hard work on figuring this out.

    Jeff

    Fist Full of Crisco

    (@fistfullofcrisco)

    Thanks for the fix! It finally works on my sites! Yay!

    Thread Starter Kimberly

    (@kellogg9)

    You’re welcome. Oops! Just spotted something. For future readers updating this manually (and so not dloading the zip file) I forgot to say in the instructions above (this WP forum doesn’t allow me to update my post) that you need to change the following line inside clearing-routines.inc.php from:

    public static function clear_on_post_page_creations_deletions ($id = FALSE)

    to

    public static function clear_on_post_page_creations_deletions ($id = FALSE, $isfuture=FALSE)

    Sorry! If you are/were using the zip file then you were already good to go. This is just a heads-up for those updating their files manually.

    Hi great explanation and FIX.

    However I am getting a miss schedule error when applying your patch.

    Have you experienced this, have I missed something.

    Using wordpress 3.5.1

    Actually sorry that may of just been a random error.

    Seems to be working I think.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Scheduled Posts — This Plugin refuses to Update’ is closed to new replies.