Skip to content

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

Closed

Description

@noisysocks

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

Activity

  1. added
    [Type] Bug
    [Feature] Synced Patterns
    on Nov 11, 2018
  2. added this to the WordPress 5.0 RC milestone on Nov 11, 2018
  3. self-assigned this
    on Nov 12, 2018
  4. added
    [Status] In Progress
    on Nov 13, 2018
  5. bph commented on Nov 18, 2018

    @bph
    Contributor

    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

Metadata

Metadata

Assignees

Labels

[Feature] Synced Patterns[Status] In Progress[Type] Bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions