Skip to content
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

Content Structure: Reusable blocks that aren't in the page are counted #11744

Closed
noisysocks opened this issue Nov 11, 2018 · 1 comment · Fixed by #11787
Closed

Content Structure: Reusable blocks that aren't in the page are counted #11744

noisysocks opened this issue Nov 11, 2018 · 1 comment · Fixed by #11787
Assignees
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@noisysocks
Copy link
Member

Describe the bug
The Content Structure component mistakenly includes reusable blocks that aren't attached to the page in its Blocks count.

To Reproduce

  1. Create a new post
  2. Insert a block
  3. Convert it to a reusable block
  4. Click Content Structure
  5. It reports that there are 2 blocks

Expected behavior
Content Structure should report that there is 1 block in the post.

Screenshots
screen shot 2018-11-12 at 10 40 05

@noisysocks noisysocks added [Type] Bug An existing feature does not function as intended [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) labels Nov 11, 2018
@noisysocks noisysocks added this to the WordPress 5.0 RC milestone Nov 11, 2018
@noisysocks noisysocks self-assigned this Nov 12, 2018
@mtias mtias added the [Status] In Progress Tracking issues with work in progress label Nov 13, 2018
@bph
Copy link
Contributor

bph commented Nov 18, 2018

I agree the Block count is whacky, but I think it's not entirely related to reusable blocks. There might be something else going on.
I recorded two videos. The screen is bit slow moving but I didn't want to edit video, to preserve the full experience.

  1. In the first video, you see me loading a post from the list of posts. Then immediately after the post fully loads, I look at the block count: 52. Also, note: 8 headings, 4 paragraphs, and 325 words.
  2. Then I move a block upwards. The Block count is now 63. The block count increased, although I didn't add a block, just moved one. And notice the change in paragraphs? It displays now 6 paragraphs, instead of 4.
  3. To double-check, I move another block, but the numbers don't change any more.
  4. Let's see what happens when I add another Twitter Embed.: The word count increases by 1 to 326, Heading stays the same, paragraphs increases by two, and Block count increases by 12 to 75 blocks.
    (First video link http://recordit.co/v7g07SUjqO)

The second video was recorded right after the first one. Starting again with the list of posts.

  1. Beginning count: Words 326, Headings 8, Paragraph back to 4 Block count 53, one more than in the first video as we added a block in between.
  2. My intention is to removed the previously added tweet, but have a hard time to get the block toolbar to show. (Again be patient :-) Eventually, I succeed in removing it. And the immediate change in numbers: 326 words, 8 headings, Paragraph block increase by 2 and the block count by 10 (although, I just removed a block)
  3. I saved the post and from the list of posts I open it again. The count is back to the orginal numbers. Words 325, Headings 8, paragraph 4 and 52 blocks.
    (Second video link: http://recordit.co/C03rtZhQF6)

Additional information:
Reusable blocks in total: 10
Reusable blocks used in this post: 1 block 2 times.

This happens on both browser in use:
Firefox Developer Edition 64.0b8 and
Google Chrome ersion 70.0.3538.102
On MacOS 10.13.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants