[wp-trac] [WordPress Trac] #63307: REST API: Returns incorrect post when querying by slug if sticky posts exist
WordPress Trac
noreply at wordpress.org
Mon Apr 28 15:25:16 UTC 2025
#63307: REST API: Returns incorrect post when querying by slug if sticky posts
exist
-------------------------------------------------+-------------------------
Reporter: wpmudevsupport13 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8.1
Component: REST API | Version: 6.8
Severity: critical | Resolution:
Keywords: changes-requested has-testing-info | Focuses: rest-api
has-unit-tests dev-feedback has-patch commit |
-------------------------------------------------+-------------------------
Comment (by SirLouen):
Replying to [comment:30 jorbin]:
> Unless you can demonstrate a way that the behavior of the rest endpoint
and WP_Query are returning different results besides the fact that there
are different defaults for sticky posts, it is working as expected. I've
pushed up a few test changes that show they are working the same.
If you go to #63360 you can see a plugin I've uploaded, that clearly
demonstrates this. I've separated into a different ticket, because the
real issue is `WP_Query` not this. Current unit tests are incomplete.
Before adding new unit tests that contemplate this, I have uploaded that
plugin for first-line testing.
But still, I left this ticket because you need to do something before
6.8.1 RC1 and as I say, the safest bet is a regression here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63307#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list