wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Wrong SEO analysis for Single title when pattern is added

Open shabnam611 opened this issue 1 year ago • 4 comments

  • [ ] I've read and understood the contribution guidelines.
  • [ ] I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

When we edit a page with title and add a H1 and then add a pattern, the SEO analysis doesn't show the duplicate H1 analysis report correctly.

To Reproduce

Step-by-step reproduction instructions

  1. Create a new page, add a title and then add a H1.
  2. Create a pattern. I create a paragraph pattern from WordPress dashboard > Editor.
  3. Add the pattern after H1. Save the page and refresh. The SEO analysis shows Single title: H1s should only be used as your main title. Find all H1s in your text that aren't your main title and change them to a lower heading level!
  4. Remove the pattern. The SEO analysis removes the Single title: H1s should only be used as your main title. Find all H1s in your text that aren't your main title and change them to a lower heading level!

Expected results

  1. As long as there is a title and H1, the analysis should show Single title: H1s should only be used as your main title. Find all H1s in your text that aren't your main title and change them to a lower heading level!

Actual results

  1. Removing the pattern removed the analysis for duplicate title even though a title and a H1 is there.

Screenshots, screen recording, code snippet

https://www.loom.com/share/ee3c9385641c482b8e6286dd8f5426c1

Technical info

  • If relevant, which editor is affected (or editors):
  • [x] Block Editor
  • [ ] Gutenberg Editor
  • [ ] Elementor Editor
  • [ ] Classic Editor
  • [ ] Other:
  • Which browser is affected (or browsers):
  • [x] Chrome
  • [ ] Firefox
  • [ ] Safari
  • [ ] Other:

Used versions

  • Device you are using: Macbook pro
  • Operating system: Chrome
  • PHP version:8.0.0
  • WordPress version: 6.7.2
  • WordPress Theme:Twenty Twenty Five
  • Yoast SEO version: 24.8.1
  • Gutenberg plugin version:
  • Elementor plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug:

shabnam611 avatar Apr 07 '25 10:04 shabnam611

Please inform the customer of conversation # 1243377 when this conversation has been closed.

shabnam611 avatar Apr 07 '25 10:04 shabnam611

Please inform the customer of conversation # 1246919 when this conversation has been closed.

Dlibs1 avatar Apr 15 '25 01:04 Dlibs1

Related issue: https://github.com/Yoast/wordpress-seo/issues/21017

josevarghese avatar Apr 15 '25 04:04 josevarghese