Opened 14 months ago
Closed 13 months ago
#20385 closed defect (bug) (fixed)
/2012/03/individual-post/?page=2 canonical redirects not properly handled
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | 3.4 |
| Component: | Canonical | Version: | 3.4 |
| Severity: | blocker | Keywords: | |
| Cc: | batmoo@…, takashi@… |
Description
Multipage posts don't have their ?page=X parameter properly redirected to a /X/ URL.
Change History (7)
comment:1
markjaquith — 14 months ago
- Owner set to markjaquith
- Resolution set to fixed
- Status changed from new to closed
- Cc batmoo@… added
- Resolution fixed deleted
- Status changed from closed to reopened
This breaks pagination on sites with static front pages: http://example.com/page/2/ gets redirected to http://example.com/2/
Adding a front page check seems to fix that:
if ( is_singular() && ! is_front_page() && get_query_var('page') ) {
comment:3
iamtakashi — 13 months ago
- Cc takashi@… added
comment:4
markjaquith — 13 months ago
- Keywords needs-unit-tests added
- Priority changed from normal to high
- Severity changed from normal to blocker
- Status changed from reopened to accepted
- Version set to 3.4
I'll work on this tonight. Needs unit tests!
comment:6
markjaquith — 13 months ago
Okay, I tried. But our canonical redirect unit tests appear to be fundamentally broken. They simulate an HTTP request. Poorly. I couldn't get the test to fail, even at [20443].
comment:7
markjaquith — 13 months ago
- Keywords needs-unit-tests removed
- Resolution set to fixed
- Status changed from accepted to closed
Sigh. Nevermind. Figured it out. Stupid typo. Made a unit test for it. The fix is good.

In [20397]: