[wp-trac] [WordPress Trac] #56991: Update to get_page_by_title in 6.1 changes WHERE clause

WordPress Trac noreply at wordpress.org
Wed Nov 9 02:15:40 UTC 2022


#56991: Update to get_page_by_title in 6.1 changes WHERE clause
--------------------------------------+----------------------------
 Reporter:  Bjorn2404                 |       Owner:  peterwilsoncc
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  6.1.1
Component:  General                   |     Version:  6.1
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+----------------------------

Comment (by peterwilsoncc):

 As noted via Slack, while the tests in this [https://github.com/WordPress
 /wordpress-develop/pull/3575 pull request are passing] on GitHub and some
 locals, they don't pass in all environments with different MySQL
 versions/engines.

 These are the results in my local, I presume we'd see further inconsistent
 results on the various [https://make.wordpress.org/hosting/test-results/
 hosting providers running tests].


 {{{
 vagrant at wp-dev:/vagrant/wordpress-develop$ git rev-parse --abbrev-ref HEAD
 fix/order-by-none
 vagrant at wp-dev:/vagrant/wordpress-develop$ phpunit --group 56991
 Installing...
 Running as single site... To run multisite, use -c
 tests/phpunit/multisite.xml
 Not running ajax tests. To execute these, use --group ajax.
 Not running ms-files tests. To execute these, use --group ms-files.
 Not running external-http tests. To execute these, use --group external-
 http.
 PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

 .F                                                                  2 / 2
 (100%)

 Time: 14.9 seconds, Memory: 242.05 MB

 There was 1 failure:

 1) Tests_Post_GetPageByTitle::test_return_same_as_old_query_2
 Failed asserting that 15 is identical to 16.

 /vagrant/wordpress-develop/tests/phpunit/tests/post/getPageByTitle.php:365
 }}}

 I've opened #57041 to deprecate the function in 6.2

 While the previous version of the function was flawed, I don't think
 differently flawed is an improvement.

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


More information about the wp-trac mailing list