[wp-trac] [WordPress Trac] #58257: Canonical URL uses comment URL when comments are set to break into pages
WordPress Trac
noreply at wordpress.org
Thu May 4 22:04:59 UTC 2023
#58257: Canonical URL uses comment URL when comments are set to break into pages
--------------------------+-----------------------------
Reporter: plari | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 6.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
If a page or post contains at least one comment, and the setting **Break
comments into pages...** ENABLED under Settings > Discussion, then the
page/post's canonical URL is appended with `comment-page-1/#comments`.
Disabling the setting returns to the canonical URL to the expected URL.
**Steps to Reproduce**
1. Publish a page or post with comments enabled.
2. Open the content and leave 1 comment
3. While here, view the page source and search for `canonical` - you
should see the expected URL
4. Open Settings > Discussion and enable **Break comments into pages...**
5. Refresh the content in question, and view the page source again. Now
the Canonical URL shows:
`https://SITE_ADRESS/POST-SLUG/comment-page-1/#comments`
Originally reported here: https://github.com/Automattic/wp-
calypso/issues/76589
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58257>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list