Make WordPress Core

Changes between Initial Version and Version 5 of Ticket #4710


Ignore:
Timestamp:
08/08/2007 04:03:26 AM (17 years ago)
Author:
markjaquith
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4710

    • Property Status changed from new to assigned
    • Property Version changed from to 2.3
    • Property Milestone changed from to 2.3 (trunk)
    • Property Owner changed from anonymous to markjaquith
  • Ticket #4710 – Description

    initial v5  
    44I tried adding wp_clear_scheduled_hook( $hook, $args ) to wp_schedule_single_event() but it didn't work. When $args is an array it doesn't seem to work.
    55You'll see from the patch I pass $post->ID directly as an int to the clear function. I'm not sure why that didn't work as an array.
     6
     7
     8----
     9
     10Barry's description:
     11
     12How to replicate:
     13
     141) Publish a post with a date in the future
     15
     162) Edit that post and change the timestamp to a date further in the future and save the post
     17
     18If you check the database, you will see that the timestamps have been updated correctly in the posts table, but in the options table, the cron option contains 2 objects in the array -- one with the old timestamp and one with the new one. When wp-cron runs, it checks that option and sees the older timestamp and therefore publishes the post at the incorrect time.
     19
     20What should happen:
     21
     22When the timestamp of a future post is changed, the entry in the cron option should be replaced, not appended to.
     23
     24----