[wp-trac] [WordPress Trac] #56992: The Loop displays incorrect data for queries started with `fields => 'id=>parent'`.
WordPress Trac
noreply at wordpress.org
Wed Feb 5 17:17:32 UTC 2025
#56992: The Loop displays incorrect data for queries started with `fields =>
'id=>parent'`.
-------------------------------------------------+-------------------------
Reporter: peterwilsoncc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8
Component: Query | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests dev- | Focuses:
feedback 2nd-opinion |
-------------------------------------------------+-------------------------
Changes (by SirLouen):
* keywords: has-patch has-unit-tests => has-patch has-unit-tests dev-
feedback 2nd-opinion
Comment:
@juzar I've been reviewing the code and testing your approach
But @oglekler raised an interesting concern I'm looking into right now:
The test seems to be failing because it is expected to work with the
minimal data structure, but your implementation seems to be trying to
convert it to full post objects, creating unnecessary overhead and
potentially changing the expected data structure.
As you said, in the original test, you can see on one side, you populated
the child post with full data, on the other side, just the bare minimal
data was retrieved, and the rest was fed with default data as you pointed
out in your first post in the test. This is why the test is failing, but
it should fail that specific test as expected, as `next_post()` should not
retrieve full data by default.
I need a 2nd opinion on this, maybe @joemcgill?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56992#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list