WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#2469 closed defect (bug) (fixed)

Multiple #2440 Issues

Reported by: masquerade Owned by: ryan
Milestone: 2.1 Priority: normal
Severity: major Version: 2.0.1
Component: Administration Keywords: has-patch
Focuses: Cc:

Description (last modified by masquerade)

  1. This causes a filter regression, plugins can no longer disable pinging at their will without clearing the option. I personally suggest adding a hook, execute_pings, to which generic_ping is added in default-filters.php as it was before.
  1. This does no checks to see if the site has been pinged already, which could lead to blacklisting upon repeated saves to the post.
  1. Generic sites will not be pinged unless a trackback or pingback is waiting, potentially delaying the pings until the next post is published.

There's something else I had that I'm forgetting, I'll update again later if I can remember.

Attachments (2)

future-pings-final.diff (3.3 KB) - added by masquerade 8 years ago.
future-pings-final2.diff (5.0 KB) - added by masquerade 8 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 masquerade8 years ago

  • Description modified (diff)

comment:2 ryan8 years ago

  • Owner changed from anonymous to ryan
  • Status changed from new to assigned

comment:3 masquerade8 years ago

On second look, item 2 could use a bit of redefining. Somebody could use this to call execute-pings.php over and over, causing stress problems for ping-o-matic (which has enough problems right now as it is) or gain blacklisting from other generic services.

Item 3 is invalid though, on second peek at the code, I realized the pinger is spawned on every post, not just when there are waiting pings.

comment:4 masquerade8 years ago

  • Keywords has-patch added; needs-patch removed

Here's a patch to fix the problems listed above, and once and for all finish of future pinging for posts.

comment:5 ryan8 years ago

Take a look in admin-footer.php where we call spawn_pinger() and conditionally load execute-pings.php inside an iframe. This is a workaround for some cgi environments where spawning doesn't work. We probably need a similar workaround for cron. We also need a more refined blacklist of spawn unfriendly environments.

Anyway, if we can get cron to fire off reliably in all environments, I like having pings goinging through cron. All of our asynchronous events can go through cron where we can take care of spawning and working around uncooperative environments in one place.

comment:6 masquerade8 years ago

I've developed and tested cron solely in CGI environments, with no issues whatsoever. If someone actually has an issue, I'd be more than happy to work on the same workaround, but I currently see no issue for it. If someone wants to send me server setup details (webserver, version, php version, etc.) for me to setup my own test environment of, I will, however, its looking rather unnecessary at the current time.

comment:7 ryan8 years ago

Okay. Let's do this. Clean out admin-header to get rid of the spawn_pinger() and execute-pings stuff. Get rid of spawn_pinger and any other leftover bits. See what breaks. If we get complaints, we might need to add the iframe workaround back in somehow.

comment:8 tnn258 years ago

Hiya,

I'm sorry if this is a dumb question. I'm not a programmer so it's a bit confusing to me when I read "future-pings-final.diff", what am I supposed to do with that code?

Sorry to bug you.
Tony.

comment:9 masquerade8 years ago

As requsted, this should clear out all the spawn_ping related code.

comment:10 ryan8 years ago

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

(In [3663]) Future post pinging and cron fixups from masquerade. fixes #2469

Note: See TracTickets for help on using tickets.