Make WordPress Core

Opened 10 months ago

Closed 9 months ago

Last modified 4 weeks ago

#58257 closed defect (bug) (duplicate)

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

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

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 10 months ago.
Page source showing canonical URL
Markup on 2023-05-04 at 14:59:17.png (199.5 KB) - added by plari 10 months ago.
Break Comments into Pages setting enabled
Markup on 2023-05-04 at 15:00:04.png (269.0 KB) - added by plari 10 months ago.
Page with 1 comment
2023-05-09_23-11-47.png (23.4 KB) - added by oglekler 10 months ago.

Download all attachments as: .zip

Change History (8)

@plari
10 months ago

Page source showing canonical URL

@plari
10 months ago

Break Comments into Pages setting enabled

@plari
10 months ago

Page with 1 comment

#1 @oglekler
10 months ago

  • Component changed from Comments to 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
10 months ago

  • Keywords close added

#3 @oglekler
9 months ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #11856.

#4 @swissspidy
4 weeks ago

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