-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document structure: Headings, Paragraphs, and Blocks counts are wrong #12042
Comments
I haven't been able to recreate this yet 🤔 I initially tried in |
Will double check on a second machine because I've been noticing strange behaviors when trying to reproduce consistently. |
After further investigation, it appears this has to do with reusable blocks. In the screenshot below, that's what One of the empty blocks listed there is the default block in this post. All the other ones are reusable blocks not used in this post but returned and counted anyways. I've also tried to delete all my reusable blocks and after that the count was correct. As soon as I've created a new reusable block in another post, then edited again this post, the count was This also explains why on the other machine I get a different count: it actually depends on the amount of reusable blocks saved in your database. When testing, please make sure you have some reusable blocks. |
Ah I see. Merged 5 hours ago 🙂 👍 Thanks. |
Tested on latest master 4.4.0:
Tried to save as draft, refresh the page, navigate away and edit the post again: the counts are always showing 4 paragraphs and 8 blocks which I don't have in my post.
I'm not sure when this started but I seem to recall it worked correctly at some point. I've randomly tried older versions of Gutenberg and in 2.9.0 the counts look correct:
The text was updated successfully, but these errors were encountered: