Skip to content

Editor "Code Editor" mode allows pasting of blocks with "parent" outside of said parents #53244

@albanyacademy

Description

@albanyacademy

Description

Code editor mode allows user to bypass inability to paste blocks outside of their specific parents.

Step-by-step reproduction instructions

  1. Add a new post
  2. See that you cannot add the core/query-pagination block by itself
  3. Add a query block, and copy the pagination block by itself
  4. Create a paragraph block, and paste in the copied pagination block.
  5. Observe that nothing happens.
  6. Go into "code editor" mode, and replace the post content with only the pagination block
  7. Observe that the pagination block is now on the page, outside of its parent query block.
  8. Observe that in the front-end, the pagination block does not show up on the page at all.

step 8 appears to be limited to any blocks that rely exclusively on server-side rendering, such as pagination and social-link. Blocks which save HTML content, such as list-item, are not affected by this.

Screenshots, screen recording, code snippet

https://www.screencast.com/t/kYGTu4Wp1ys

Environment info

Wordpress 6.2.2, no plugins installed.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TestingNeeds further testing to be confirmed.[Feature] Code EditorHandling the code view of the editing experience[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions