Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#58257 closed defect (bug) (duplicate)

Canonical URL uses comment URL when comments are set to break into pages

Reported by: plari Owned by:
Priority: normal Milestone:
Component: Canonical Version: 6.2
Severity: normal Keywords: close
Cc: Focuses:

Description

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

Attachments (4)

Markup on 2023-05-04 at 15:00:53.png​ (211.9 KB ) - added by plari 3 years ago.
Page source showing canonical URL
Markup on 2023-05-04 at 14:59:17.png​ (199.5 KB ) - added by plari 3 years ago.
Break Comments into Pages setting enabled
Markup on 2023-05-04 at 15:00:04.png​ (269.0 KB ) - added by plari 3 years ago.
Page with 1 comment
2023-05-09_23-11-47.png​ (23.4 KB ) - added by oglekler 3 years ago.

Download all attachments as: .zip

Change History (8)

@plari
3 years ago

Page source showing canonical URL

@plari
3 years ago

Break Comments into Pages setting enabled

@plari
3 years ago

Page with 1 comment

#1 @oglekler
3 years ago

  • Component Comments → Canonical

Hi @plari Thank you for the ticket. I checked it with 6.3-alpha-55505-src version and got the similar result (see above).
It looks like duplicate for #11856 and if so, the current ticket should be closed and linked in the first one.

#2 @oglekler
3 years ago

  • Keywords close added

#3 @oglekler
3 years ago

  • Resolution → duplicate
  • Status new → closed

Duplicate of #11856.

#4 @swissspidy
3 years ago

  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.