Make WordPress Core

Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#967 closed defect (bug) (fixed)

publish_post is not triggered via xml-rpc or email posting

Reported by: anonymousbugger Owned by: skippy
Milestone: Priority: low
Severity: minor Version: 1.5
Component: XML-RPC Keywords: bg|2nd-opinion bg|has-patch
Focuses: Cc:

Description

publish_post is not triggered when someone uses a program that posts via xml-rpc (w.bloggar for instance) or when someone posts by email

Attachments (1)

add publish_post, edit_post hooks for xmlrpc posting.diff (1.6 KB) - added by anonymousbugger 17 years ago.

Download all attachments as: .zip

Change History (13)

#1 @anonymousbugger
17 years ago

  • Patch set to No

#2 @majelbstoat
17 years ago

Uploaded a patch which adds the required hooks. Actually, just lifted the same code from post.php, but haven't had a chance to test it out yet. Also adds hooks for trackbacks, enclosures, and pingbacks if specified. Quick and dirty, and in need of review before committing, but might do the trick. J.

#3 @majelbstoat
17 years ago

Forgot to mention, didn't touch email posting for now, as it has the action 'publish_phone' hooked in. Maybe plugins that add an action for publish_post should silently have a publish_phone action added as well? Would produce the most expected behaviour IMHO. Either that or copy the same code block again? If that was the case it would be reproduced 6 times (and thus a possible candidate for being its own reusable function maybe?)

#4 @michel v
17 years ago

Actually, what is needed is specific XMLRPC hooks. We can not copy hooks made with a particular purpose in mind and expect they'll work the same elsewhere.
For example with this patch, do_trackbacks() wouldn't trackback anything when making a new post, because the field to_ping wouldn't be populated yet.

#5 @briangroce
17 years ago

Any update on this?

#6 @skippy
17 years ago

  • Keywords bg|2nd-opinion bg|needs-patch added
  • Owner changed from anonymous to skippy
  • Priority changed from normal to low
  • Status changed from new to assigned

#7 @skippy
17 years ago

  • Keywords bg|has-patch added; bg|needs-patch removed

#8 @markjaquith
17 years ago

According to michel_v's logic, we'd need a publish_xmlrpc hook...

#9 @skippy
17 years ago

But according to Ryan, the new workflow uses the same process for all posts, regardless of how they come in. We could have a publish_xmlrpc hook (like publish_phone), for actions specific to that kind of posting, but those are still considered posts and should trigger publish_post.

#10 @skippy
16 years ago

  • Milestone set to 1.5.2

#11 @matt
16 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [2780]) Fixes #967, Fixes #972, Fixes #1578, Fixes #1580, Fixes #1567, Fixes #1481, Fixes #1186

#12 @(none)
15 years ago

  • Milestone 1.5.2 deleted

Milestone 1.5.2 deleted

Note: See TracTickets for help on using tickets.