wp-calypso icon indicating copy to clipboard operation
wp-calypso copied to clipboard

Canonical URL Being Set to Comment URL when comments are set to break into pages and content contains comments

Open kelasante opened this issue 2 years ago • 8 comments

Slight updates added to the report after triaging -cuemarie

Quick summary

On certain themes like Blank Canvas, Attar, and Twenty Twenty-three, when Settings > Discussion is set to "Break comments into pages", and a page or post contains at least one comment, the canonical URL is set to the comment URL of the page instead of the actual URL of the page.

~This was first reported on an FSE theme. However, it does not happen on all FSE themes, as Twenty Twenty-Two works fine. I tested a few Classic themes (Twenty Nineteen & Hemingway Rewritten), and they were fine, but I can't tell if it happens on other classic themes.~

With the updated step of enabling "Break comments into pages", I was able to replicate in both TT2 and Twenty Nineteen, so I don't think at this time this is theme specific. -cuemarie

Steps to reproduce

  1. Switch to the Blank Canvas theme.
  2. Add a comment on the page.
  3. Open Settings > Discussion and enable the setting "Break comments into pages..."
  4. View the page source and search for "canonical."
  5. The canonical URL is set as the comment URL. Markup 2023-05-04 at 09 45 52 the

What you expected to happen

The canonical URL to be set as the default URL of the page Markup 2023-05-04 at 09 47 58

What actually happened

The issue was first reported in 6258023-zen. A user run an SEO report on SEMRush and they were told that some URLs that are listed in my sitemaps that are "non-canonical" and, therefore may confuse the search engines. I inspected those URLs and found that they were all comment URLs.

Impact

Most (> 50%)

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Simple, Atomic

Logs or notes

Workarounds include Deactivating the "Break comments into pages setting, switching themes, removing comments, or using an SEO plugin to set a canonical URL. However, some of these workarounds may be inconvenient for users.

kelasante avatar May 04 '23 13:05 kelasante

Support References

This comment is automatically generated. Please do not edit it.

  • [ ] 6258023-zen
  • [ ] 6329063-zen
  • [ ] 7368435-zen

github-actions[bot] avatar May 04 '23 13:05 github-actions[bot]

📌 SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain

  • Tested on Simple – Replicated
  • Tested on Atomic – Replicated
  • Replicable outside of Dotcom – Yes

📌 FINDINGS/SCREENSHOTS/VIDEO

  • The user in question actually figured this out further for us: The Canonical URL appends with /coment-page-1/#comments when any page or post has at least one comment, and the setting Break comments into pages is enabled within Settings > Discussion. Replicated on *TT3, Twenty Twenty-Two, and Twenty Twenty in Simple, AT, and Self-Hosted.

Screenshots/Recordings

AT site; starts with the setting on, then is disabled

https://user-images.githubusercontent.com/27249804/236336947-1c1ec47b-90ba-442e-9d2b-6eb914a00407.mov

📌 ACTIONS

  • Assigned to @Automattic/loop (just corrected my ping here, tagged the wrong loop)
  • Reported in Core: https://core.trac.wordpress.org/ticket/58257

cuemarie avatar May 04 '23 21:05 cuemarie

Another case here: 6329063-zd-woothemes Turned off the Break comments into pages setting for them to resolve.

tellisbethel avatar May 30 '23 14:05 tellisbethel

Thank you for the detailed report! I've moved this to our teams bugs board.

davemart-in avatar May 31 '23 18:05 davemart-in

Awesome! Thanks, @davemart-in. I'm going to add it back to the Dotcom Bug Prioritization Board as well, just so we can continue monitoring it on our end. Please let me know if that causes any issues!

john-legg avatar May 31 '23 18:05 john-legg

Sounds good. Sorry about that @john-legg! Thanks for letting me know. I wasn't sure about the correct procedure. I'll go ahead and leave it assigned to both for future bugs that we get pinged on.

davemart-in avatar May 31 '23 18:05 davemart-in

Found another case here: 7368435-zd-a8c Advised the customer to disable the Break comments into pages... setting as a workaround.

matt-west avatar Nov 30 '23 17:11 matt-west

Found another case here: 7368435-zen Advised the customer to disable the Break comments into pages... setting as a workaround.

The customer in this report came back to us with some additional feedback on this:

Google has done a fresh crawl of my website and while the issue seems resolved on some pages, I still have non canonical issues remaining. ... They still seem to be related to posts in the twenty twenty three theme.

image001

They also mentioned that the following pages are still failing:

http://thomaskung.se/kolonins-sci-fi-teknik/ 6 dec. 2023
http://thomaskung.se/rod-tvilling-kolonin/ 6 dec. 2023
https://www.thomaskung.se/ 6 dec. 2023
http://thomaskung.se/platser-i-kolonin/huvudstaden-shin-dal/ 6 dec. 2023
http://thomaskung.se/om-forfattaren/ 6 dec. 2023
http://thomaskung.se/platser-i-kolonin/huvudstaden-nya-rov/ 6 dec. 2023
http://thomaskung.se/2023/08/14/valkommen/ 6 dec. 2023
https://thomaskung.se/huvudstaden-nya-rov/ 4 dec. 2023
http://thomaskung.se/kontakt/ 26 nov. 2023
http://thomaskung.se/kolonin/ 26 nov. 2023

On the other hand, these are approved:

https://thomaskung.se/karta-over-kolonin/ 6 dec. 2023
https://thomaskung.se/2023/11/26/forfattaren-och-vardagen/ 6 dec. 2023
https://thomaskung.se/skriva/ 6 dec. 2023
https://thomaskung.se/nyheter/ 26 nov. 2023
https://thomaskung.se/ 24 nov. 2023

pauljacobson avatar Dec 17 '23 12:12 pauljacobson