[wp-trac] [WordPress Trac] #45801: Duplicate post publish action

WordPress Trac noreply at wordpress.org
Mon Dec 31 21:53:44 UTC 2018


#45801: Duplicate post publish action
--------------------------+-----------------------------
 Reporter:  bmettee4      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:  5.0.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I'll try to keep this short. Action "publish_to_publish" is being called
 twice when updating a published post under some circumstances. Web server
 registers two calls (one to index.php, one to /wp-admin/post.php). First
 call appears to update the content and non-meta data. Second call updates
 data from meta blocks.

 Specifics: Any theme or plugin that adds meta data to a post forces a
 second call to the update process with the meta block data.

 Problem: Any plugin that performs actions based on "publish_to_publish" is
 being called twice. In my specific instance the Better Notifications for
 WordPress plugin sends notifications mails doubled.

 Wordpress version: 5.0.2
 Theme: Customify, no plugins
 Or
 Theme: TwentyNineteen, and Plugin: Profile Builder

 Basically anything that adds meta-data to a post object causes a second,
 duplicate, action.

 If meta-data updates should trigger a second action, how can a plugin
 detect that there has been an additional call?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45801>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list