[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 26 18:06:52 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 |
-------------------------------------------------+-------------------------
Comment (by SirLouen):
@peterwilsoncc maybe priming the cache in the next_post is worth, but
maybe with a use case you can prove why the test ``
test_the_loop_when_querying_post_parents_only`. Have you found an scenario
where you need more info required by `next_post`?
Once you can get `id=>parent` for the part ID, can you just query the ID
to get the information?
Can you suggest an scenario where actually retrieving the whole info from
next post could be useful (instead of simply being able to query the next
post). I'm assuming that the least information picked, the better
(specially because the next post is queried for each post in the loop so
as we were commenting this could be a performance issue).
Also, I don't really understand what you mean with priming the cache and
not sure if still, fetching the whole info from next post, and caching,
would be a great idea either.
Without an example of why this could be useful, I'm clueless of why this
change is worthy, and despite the patch solves the issue, I'm not sure,
if, in first place, there is a issue.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56992#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list