[wp-trac] [WordPress Trac] #36824: do_all_pings function queries all posts

WordPress Trac noreply at wordpress.org
Wed Sep 18 11:37:15 UTC 2019


#36824: do_all_pings function queries all posts
--------------------------------------+---------------------------
 Reporter:  spacedmonkey              |       Owner:  boonebgorges
     Type:  enhancement               |      Status:  reviewing
 Priority:  normal                    |   Milestone:  5.3
Component:  Pings/Trackbacks          |     Version:  2.1
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+---------------------------

Comment (by dshanske):

 Replying to [comment:52 boonebgorges]:
 > [attachment:"36824-pings.diff"] includes only the change to the
 `pingback` query. It corrects the `meta_key` / `meta_value` error in the
 most recent patches. Looking at the SQL generated, there are two
 potentially breaking changes. I'd like feedback from others with an
 understanding of this issue before moving forward with it.
 >
 > 1. Currently, the _pingme query doesn't look at post type at all. Now
 we're limiting it to those post types with `post_type_supports(
 'trackbacks' )`. ([comment:38 Related concern].) This seems like it will
 break expected behavior. What problem is it meant to solve? In part, it
 addresses the problems with  `'post_type' => 'any'` ([comment:10
 reference]). But I wonder if we might instead pass a list of all
 registered post types, for better backward compatibility. This issue could
 then possibly be revisited after #39960.
 >
 Specifically with trackbacks, it is currently all or nothing and they are
 a spam concern. That said, the other idea about improving the declared
 post type supports functionality would address that issue.

 > 2. Currently, the pingback query is post_status-agnostic. Now, it's
 limited to `publish`. Could this have unintended consequences? In theory,
 only published posts should have `_pingme`
 https://core.trac.wordpress.org/browser/tags/5.2.3/src/wp-
 includes/post.php#L6551 but I'd like others to weigh in.

 It can't have unintended consequences because pingbacks require
 verification. So the remote site is required to check that it is being
 linked to. If the post isn't published, it won't be able to retrieve it.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/36824#comment:55>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list