Opened 12 years ago
Closed 12 years ago
#21278 closed defect (bug) (duplicate)
Canonical redirect for non-existent singular paged content
Reported by: | smub | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4.1 |
Component: | Canonical | Keywords: | |
Focuses: | Cc: |
Description
I'm using version 3.4.1
For ex: we have this article on WPBeginner
http://www.wpbeginner.com/wp-tutorials/how-install-wordpress-cdn-solution-maxcdn/
Anyone can simply add:
http://www.wpbeginner.com/wp-tutorials/how-install-wordpress-cdn-solution-maxcdn/345/
This will resolve the post with the rel="canonical" for the new page which creates duplicate content.
I tried this with @JJJ at WordCamp columbus. This only works with numbers not letters or characters. It has to do something with post pagination even though the article is not split into pages.
Change History (11)
#1
@
12 years ago
- Component changed from General to Canonical
- Milestone changed from Awaiting Review to 3.5
#3
@
12 years ago
- Keywords reporter-feedback added; needs-patch removed
Could not reproduce on Twenty Eleven or Twenty Twelve either.
Looking at rel_canonical()
, it should always return just the permalink, without additional numbers:
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/link-template.php#L2290
#4
@
12 years ago
- Milestone changed from 3.5 to Awaiting Review
I could reproduce it, but forget that I had a SEO plugin active which adds the canonical link and has this bug.
smub, any SEO plugins active?
#5
@
12 years ago
Yikes. Yes, I had WordPress SEO by Yoast plugin active when trying this out. Disabled it, and it seemed to fix the issue. Tried All in One SEO pack, and that one did not have a bug. I guess, I need to start a thread for Yoast.
#6
@
12 years ago
- Keywords reporter-feedback removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
#7
@
12 years ago
- Cc sirzooro added
- Keywords needs-patch added
- Resolution invalid deleted
- Status changed from closed to reopened
There is another issue here: these URLs are invalid, so in my opinion WP should either return 404 error or perform caconical redirect to URL without page number appended.
#8
@
12 years ago
- Milestone set to Awaiting Review
- Summary changed from Infinite Duplicate Content (improper rel="canonical" for non-existant paged content) to Canonical redirect for non-existent singular paged content
Related: #11857 (for archive pages)
I can't reproduce this in any theme that's currently located in trunk. The steps I'm following to attempt to reproduce are:
<link rel='canonical' href='http://localhost/dev/wordpress/trunk/hello-world/' />
)<link rel='canonical' href='http://localhost/dev/wordpress/trunk/hello-world/' />
)I've also tried this with Twenty Ten and Twenty Eleven in WordPress 3.4.1 and the canonical URL still renders appropriately regardless of paged value.
Would like to dig into a bit deeper - what theme were you using when seeing this behavior?