Opened 9 years ago
Closed 9 years ago
#34890 closed defect (bug) (fixed)
Canonical meta tag for paginated posts incorrect with ugly permalinks
Reported by: | peterwilsoncc | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.4.1 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Canonical | Keywords: | has-patch has-unit-tests fixed-major |
Focuses: | Cc: |
Description (last modified by )
Following [34496] canonical URLs of paginated posts with ugly permalinks are incorrect.
Page http://example.com/?p=1&page=2
Canonical meta tag: <link rel="canonical" href="http://example.com/?p=1/2" />
.
Going the canonical URL loads the first page.
Note: title updated to reference meta tag
Attachments (2)
Change History (12)
#2
@
9 years ago
- Description modified (diff)
- Summary changed from Canonical URLs for paginated posts incorrect with ugly permalinks to Canonical meta tag for paginated posts incorrect with ugly permalinks
This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.
9 years ago
#6
@
9 years ago
- Keywords has-unit-tests added; needs-unit-tests removed
34890.2.diff includes unit tests for paginated posts both with and without pretty permalinks.
Let me know if the tests needs rewriting, moving or both, it's my first attempt at unit tests.
#7
@
9 years ago
- Owner set to wonderboymusic
- Status changed from new to assigned
@wonderboymusic, @joostdevalk - this was introduced in [34496] which both of you worked on, can you take a look?
Note: See
TracTickets for help on using
tickets.
34890.diff corrects canonical URL for paginated posts:
page
querystring if pretty permalinks are not setAdapted from the code in
_wp_link_page
.