[wp-trac] [WordPress Trac] #56689: Use WP_Query in get_page_by_path

WordPress Trac noreply at wordpress.org
Thu Feb 2 20:01:30 UTC 2023


#56689: Use WP_Query in get_page_by_path
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
                                                 |  spacedmonkey
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.2
Component:  Query                                |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  needs-testing has-patch has-unit-    |     Focuses:
  tests has-testing-info 2nd-opinion             |  performance
-------------------------------------------------+-------------------------
Changes (by iandunn):

 * keywords:  needs-testing has-patch has-unit-tests has-testing-info =>
     needs-testing has-patch has-unit-tests has-testing-info 2nd-opinion


Comment:

 > Why do we need to revert?

 What I heard was that we should investigate ''or'' revert. Since it was
 [https://wordpress.slack.com/archives/C02KGN5K076/p1675270307876559
 mentioned in a bug scrub] and Beta 1 is next week, I'm assuming they were
 thinking of a temporary revert that would give us time to explore a
 permanent fix.
 [[br]]


 > What is the worry here?

 My worry is simply that r55169 will introduce fatal errors into an unknown
 number of sites if we do nothing. IMO that's a significant problem and
 needs to be addressed in some way.
 [[br]]

 > Looks like a brittle implementation

 The w.org code was written by an experienced dev, and it doesn't seem
 obviously "wrong" to me at a glance. Even if it is, though, it seems like
 something that a lot of plugin devs might be doing. I don't think we can
 expect folks to be aware of the internals of Core functions.

 I feel like back-compat is one of our foundational values and commitments
 -- because it makes ''Core'' less brittle from the user's perspective --
 so we'd need a compelling reason to break it. Writing code that works
 today, only to get a fatal error 6 years later is the kind of situation
 that back-compat is intended to prevent.

 I do think there's a reasonable balance to strike, though, and obviously
 the performance improvement is a good thing. I feel like there needs to be
 a sincere exploration of the impact and potential solutions, rather than
 accepting that sites will break.

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


More information about the wp-trac mailing list