• Resolved yannunil

    (@yannunil)


    Hello,

    We have a problem on a website, posts are not expiring.

    It is working perfectly on another blog on the production server and on a local installation (but plugins can differ), it only concerns that blog.

    Here are the diagnostics logs :

    2017-07-13 08:49:38	13787 -> SCHEDULED at Thu, 13 Jul 2017 06:51:00 +0000 (1499928660) with options Array ( [expireType] => draft [id] => 13787 )
    2017-07-13 08:49:38	13787 -> EXISTING FOUND - UNSCHEDULED
    2017-07-10 13:53:26	13804 -> SCHEDULED at Fri, 18 Aug 2017 21:59:00 +0000 (1503093540) with options Array ( [expireType] => draft [id] => 13804 )
    2017-07-10 13:53:26	13804 -> EXISTING FOUND - UNSCHEDULED

    What does it means ? Can this be related to a plugin conflict (see the list below, maybe there is a known problem with one of them) ?
    Crons seems to be created correctly but failed to execute.

    Some information about the blog:

    Wordpress 4.8 multisite installation
    Theme Twenty Thirteen
    6 pages, 1800+ posts (180 published)
    List of active plugins :

    • BackWPup 3.4.1
    • Better Plugin Compatibility Control 4.7.0.1
    • Comet Cache Pro 170220
    • Disable New User Notification 1.1
    • Google XML Sitemaps 4.0.8
    • Imsanity 2.3.9
    • iThemes Security Pro 3.3.0
    • List category posts 0.72
    • Media File Sizes 1.8
    • Multi-Site Site List Shortcode 5.5.1
    • Multisite Custom CSS 1.0
    • Multisite Enhancements 1.3.8
    • Multisite Plugin Manager 3.1.5
    • Multisite Plugin Stats 1.1
    • New Blog Defaults (CETS) 2.2.2
    • Optimize Database after Deleting Revisions 4.2.3
    • Post Expirator 2.2.1
    • Remove new site notification email 4.5–4.8
    • Remove welcome user notification email
    • Simple Custom CSS 3.3
    • Thirteen Colors 1.0
    • WP Google Fonts 3.1.4
    • WPMU Ldap Authentication 4.0.2

    Regards.

Viewing 8 replies - 1 through 8 (of 8 total)
  • What happens if you create a brand new post, and set the expiration options? What shows in the debug log for that post?

    Hi Aaron,

    I have a similar issue on a client’s site. I have two websites which are hosted on the same server(VPS). Both use Post Expirator to expire deals by category replacement. One of them is working fine. The other one is not.

    I checked the debug log and got the same error.

    2017-07-20 15:54:40	230075 -> SCHEDULED at Thu, 31 Aug 2017 19:59:00 +0000 (1504209540) with options Array ( [expireType] => category [id] => 230075 [category] => Array ( [0] => 5270 ) [categoryTaxonomy] => offer_cat )
    2017-07-20 15:54:39	230075 -> EXISTING FOUND - UNSCHEDULED
    2017-07-20 15:53:06	230075 -> SCHEDULED at Thu, 31 Aug 2017 19:59:00 +0000 (1504209540) with options Array ( [expireType] => category [id] => 230075 [category] => Array ( [0] => 5270 ) [categoryTaxonomy] => offer_cat )
    2017-07-20 15:53:04	230075 -> EXISTING FOUND - UNSCHEDULED

    I thought it was a cron issue, but the plugin is working just fine on the other website, given that both of them are on same VPS.

    Is it plugin conflict? Can you give some pointers?

    Thanks.

    @soumilroy what is different between the two wordpress installs?

    @axelseaa There isn’t much difference. They all have similar settings. The only difference I see is that the installs vary in sizes. The Post expirator working site expires 1-2 posts everyday, the other expires nearly 30-40 posts everyday.

    @soumilroy do scheduled posts work on the site? Typically, if there is a cron issue going on, scheduled posts also won’t work.

    You can also disable the built in cron, and setup a cron job or schedule task to run at your specified interval. Inmotion has a guide here that gives you the general idea of how you might do this: http://www.inmotionhosting.com/support/website/wordpress/disabling-the-wp-cronphp-in-wordpress

    @axelseaa Finally fixed it. You’re correct about the cron problem. There were like 40k cron jobs stored in the db. I cleared them from the mysql commandline with this

    UPDATE wp_options SET option_value = '' WHERE option_name = 'cron';

    and voila. It worked.

    Thread Starter yannunil

    (@yannunil)

    Hi,

    I’m back, sorry for the late reply.

    @soumilroy Thank you for commenting. Unfortunately it seems to be a different problem in my case. I only have 18 jobs in the wp_options table and not all are related to Post Expirator (anyway, your query is a little bit radical as it deletes all crons from the DB, not only those related to Post expirator).

    @axelseaa Thank you, the specified diagnostics logs were extracted from a test with a brand new post.

    The only difference with other sites in my installation is that this site is protected (Shibboleth authentication rule defined at Apache level), but removing the rule seems not to help.

    I will try to disable the built-in cron and setup a new cron job, without convictions…

    Thread Starter yannunil

    (@yannunil)

    Ok we completely removed the Apache rules (Location directives) related to authentication (not only the Require attributes as we tried before) and it works, post are expiring.

    It seems that WP CRON uses network connections to trigger the jobs.

    So in case someone has the same problem in the future, here is a rule to exclude the wp-cron from the authentication (for site mysite):

    <Location ~ "/mysite/(wp-cron.php)"> 
         AuthType None
         Satisfy Any
         Allow from all
         Require all granted
    </Location>

    Regards.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Post not expiring (EXISTING FOUND)’ is closed to new replies.