[wp-trac] [WordPress Trac] #35344: Strange pagination issue on front page after 4.4.1 update
WordPress Trac
noreply at wordpress.org
Thu Jan 7 07:00:30 UTC 2016
#35344: Strange pagination issue on front page after 4.4.1 update
------------------------------------------------------+--------------------
Reporter: northeme | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.4.2
Component: Query | Version: 4.4.1
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests needs-testing | Focuses:
------------------------------------------------------+--------------------
Comment (by dd32):
So this is actually quite a fun weird bug.
The fix for #35031 calls `get_queried_object()` which causes
`$wp_query->queried_object` to get set, That being set then triggers a few
rules in `redirect_canonical()` which specifically deal with page-on-front
(which must've been broken previously?).
Ultimately it comes down to the fact that canonical doesn't know how to
deal with paged posts when they're on the front-page, it specifically
excludes `is_front_page()` - the problem being I can't see where it's
supposed to be handled instead.
[attachment:35344.2.diff] makes it work for me, by properly creating the
canonical URL.
It seems like it was probably a 4.4 regression that's caused
`$wp_query->queried_object` to be false/unset at the time that
`redirect_canonical()` gets called.. I'm not sure how/what happened
there..
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35344#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list