Opened 11 years ago
Closed 11 years ago
#34890 closed defect (bug) (fixed)
Canonical meta tag for paginated posts incorrect with ugly permalinks
| Reported by: | peterwilsoncc | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4.1 |
| Component: | Canonical | Version: | 4.4 |
| Severity: | normal | Keywords: | has-patch has-unit-tests fixed-major |
| Cc: | Focuses: |
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
@
11 years ago
- Description modified (diff)
- Summary Canonical URLs for paginated posts incorrect with ugly permalinks → Canonical meta tag for paginated posts incorrect with ugly permalinks
This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.
11 years ago
#6
@
11 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.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
34890.diff corrects canonical URL for paginated posts:
pagequerystring if pretty permalinks are not setAdapted from the code in
_wp_link_page.