[wp-trac] [WordPress Trac] #7557: Published 'future' posts not sent by plugin Subscribe 2

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 20 17:19:43 GMT 2008


#7557: Published 'future' posts not sent by plugin Subscribe 2
---------------------+------------------------------------------------------
 Reporter:  moxie    |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  low      |   Milestone:           
Component:  General  |     Version:  2.5.1    
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 Not quit sure this is the right place for this, but it was suggested by
 the author of the Subscribe2 plugin to post it here.

 I'm using the http://birdhouse.org/software/futurepost plugin to publish
 posts with a future date immediately because it's a website for a festival
 in which the publish date for each event is also the actual date for that
 event. This way I could use queries to show future and past events by
 checking the current date: http://www.kwartiermakersfestival-mb.nl/

 But the subscribe2 plugin doesn't send notifications for those published
 posts with a future timestamp, although - according to the author - it
 should:

 (the author...)
 The plugin you are using removed the future post hook and pushes future
 posts through wp_publish_post() instead.
 This is a core WordPress function that changes the status of the post to
 ‘publish’ and calls the transition function wp_transition_post_status().
 This function in turn should call the transition function
 future_to_publish which means that Subscribe2 should work!
 The only thing I can figure it may be is in the wp_publish_post()
 function. There are two lines as follows:

 $wpdb->update( $wpdb->posts, array( 'post_status' => 'publish' ), array(
 'ID' => $post_id ) );
 $old_status = $post->post_status;

 I think these need to be swapped around and it may then work. If it does
 please let me know and I’ll submit a trac ticket.
 (... end reply of author).

 His suggestion doesn't work. Any idea why?

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7557>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list