Title: Issue with scheduled posts
Last modified: September 27, 2016

---

# Issue with scheduled posts

 *  Resolved [Papoum](https://wordpress.org/support/users/papoum/)
 * (@papoum)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/issue-with-scheduled-posts/)
 * Hi,
 * It seems that there is a problem with Plugin Organizer and scheduled posts.
 * When a scheduled post is published, “transition_post_status” hook is fired and
   your function “update_post_status” updates the post status in “po_plugins” table.
   
   But it does not update “permalink”, “permalink_hash” (and “permalink_hash_args”?)
   which are modified when the post status changes from future to published. Then,
   as “permalink_hash” is not up to date, the post is not found and plugin exclusions
   are not applied.
 * On the opposite, when we change manually the post status on the post meta box,
   everything is fine.
 * Here is what I did to fix/hack this on my functions.php file.
    There surely might
   be better solutions but it seems to work…
 * global $PluginOrganizer;
    if ($PluginOrganizer) { remove_filter( ‘transition_post_status’,
   array($PluginOrganizer, ‘update_post_status’) ); function my_update_post_status(
   $newStatus, $oldStatus, $post) { global $wpdb; $permalink = get_permalink($post);
   $permalink = preg_replace(‘/^.{1,5}:\/\//’, ”, $permalink); $permalinkNoArgs 
   = preg_replace(‘/\?.*$/’, ”, $permalink); $wpdb->update($wpdb->prefix.”po_plugins”,
   array(“status”=>$newStatus,”permalink”=>$permalink, “permalink_hash”=>md5($permalinkNoArgs),“
   permalink_hash_args”=>md5($permalink)), array(“post_id”=>$post->ID)); } add_filter(‘
   transition_post_status’, ‘my_update_post_status’, 10, 3); }
 * It would be great if you could fix this directly in the plugin.
 * Thanks.
    -  This topic was modified 9 years, 7 months ago by [Papoum](https://wordpress.org/support/users/papoum/).

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

 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/issue-with-scheduled-posts/#post-8231858)
 * I’ve got a fix for this. It has been tested. I have another fix to release. Should
   be in a few hours.
 *  Thread Starter [Papoum](https://wordpress.org/support/users/papoum/)
 * (@papoum)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/issue-with-scheduled-posts/#post-8231874)
 * Great !
 * Thanks.
 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/issue-with-scheduled-posts/#post-8239502)
 * Version 6.0.11 should fix this problem.
 *  Thread Starter [Papoum](https://wordpress.org/support/users/papoum/)
 * (@papoum)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/issue-with-scheduled-posts/#post-8246239)
 * Problem solved !
    Thank you.
 *  Thread Starter [Papoum](https://wordpress.org/support/users/papoum/)
 * (@papoum)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/issue-with-scheduled-posts/#post-8933617)
 * Hi,
 * The problem (not exactly the same problem but the same result) is back…
    When
   a scheduled post is published, po_plugins table is not updated. It seems that
   it is because of the adding of “is_admin()” condition in plugin-organizer.php(
   condition added in version 8.0). Is there a way to fix/hack this problem ?
 * Thanks.
 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/issue-with-scheduled-posts/#post-8934991)
 * For now you can just remove the if statement in plugin-organizer.php. I’ll take
   it out on the next release. Was intended to increase performance on the front
   end. I didn’t see that it caused issues with scheduled posts.
 *  Thread Starter [Papoum](https://wordpress.org/support/users/papoum/)
 * (@papoum)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/issue-with-scheduled-posts/#post-8935028)
 * Thank you, I will do that.

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

The topic ‘Issue with scheduled posts’ is closed to new replies.

 * ![](https://ps.w.org/plugin-organizer/assets/icon-256x256.png?rev=1786554)
 * [Plugin Organizer](https://wordpress.org/plugins/plugin-organizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/plugin-organizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/plugin-organizer/)
 * [Active Topics](https://wordpress.org/support/plugin/plugin-organizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/plugin-organizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/plugin-organizer/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Papoum](https://wordpress.org/support/users/papoum/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/issue-with-scheduled-posts/#post-8935028)
 * Status: resolved