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

Adding block as a design pattern causes the "Text length" assessment to show wrong word counts

Open markonikolas opened this issue 1 year ago • 4 comments

Adding a block as a design pattern shows a wrong counter value. The more blocks you add as a design pattern, the larger the increase in value. I've first noticed this issue in production and tried to replicate it in a clean environment with no plugins and with a twentytwenty-four theme.

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

Please give us a description of what happened

To Reproduce

Step-by-step reproduction instructions

  1. add text to the editor canvas so that the count is showing value over 300.
  2. add a block to the page but make sure it's nested in columns or group block because it will show immediately. If the block is in the root of the canvas it would take save and a refresh for the word counter to show the wrong value.
  3. add block as a design pattern and you should be able to see a word count increase.

Expected results

  1. word count unchanged

Actual results

  1. word count increases / decreases in some cases

Screenshots, screen recording, code snippet

Screencast from 2024-01-04 19-42-38.webm

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
  • [x] Safari
  • [x] Other: Chromium, but the issue is initially reported on a production environment, using Safari / Chrome

Used versions

  • Device you are using: Desktop
  • Operating system: Debian 12
  • PHP version: 8.2
  • WordPress version: 6.4.2
  • WordPress Theme: TwentyTwenty-Four
  • Yoast SEO version: 21.7
  • Gutenberg plugin version:
  • Elementor plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug:

markonikolas avatar Jan 04 '24 19:01 markonikolas

Hi @markonikolas

Thanks for using the Yoast SEO plugin and for creating an issue with the "Text length" analysis showing incorrectly when changing the block as a Pattern.

I tested this case at my lab site, and I can replace this at my end.

What's next? Our product team will assess the severity of this problem in relation to other open bug reports and new features. Based on their assessment, the bug report will be given a priority level. Our developers work on the highest priority issues first. Unfortunately, this means we cannot give you an estimate of when they'll start working on your report.

josevarghese avatar Jan 16 '24 10:01 josevarghese

Steps to replicate this:

  1. Create a post with a Group block
  2. Add a Paragraph block to it
  3. Then change the newly added paragraph block within the Group as a Pattern
  4. You can notice that the "Text length" word count changes by adding the words within the Pattern, which is an incorrect assessment.

See the screencast for reference: https://github.com/Yoast/wordpress-seo/assets/34977009/24d248dc-2d81-47a0-a765-7c57c44b396c

Even after updating the post, the word count shows as an incorrect assessment of words.

Expected results The text length assessment should not consider the words on the Pattern again after changing a block to the Pattern.

josevarghese avatar Jan 16 '24 10:01 josevarghese

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

suascat avatar Feb 02 '24 06:02 suascat

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

suascat avatar Feb 05 '24 07:02 suascat