[wp-trac] [WordPress Trac] #56992: The Loop displays incorrect data for queries started with `fields => 'id=>parent'`.
WordPress Trac
noreply at wordpress.org
Sat Mar 15 21:16:21 UTC 2025
#56992: The Loop displays incorrect data for queries started with `fields =>
'id=>parent'`.
--------------------------------------+----------------------------
Reporter: peterwilsoncc | Owner: peterwilsoncc
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.8
Component: Query | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: performance
--------------------------------------+----------------------------
Comment (by peterwilsoncc):
> Yesterday I was thinking: If this has been like this for a good time, as
I said, performance impact could occur on those who were not needed to
fully hydrate the global post as I showed in my example.
With the changes in the WIP pull request, the performance impact is only
affecting starting the loop for queries that are initiated with a partial
data set, ie `id, parent`. This is expected as the extra database queries
are what fixes the bug.
I don't think there is any benefit of adding a new parameter to bypass the
bug fix as the partial data remains available via the posts property. The
change in this PR makes the loop consistent with how it now works with
`id` and `all`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56992#comment:48>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list