Skip to content

Adding duplicate Template Part removes both from page, can trigger clearing inner blocks in dirty state. #22639

@Addison-Stavlo

Description

@Addison-Stavlo

Describe the bug
This seems to be a recent regression. Adding the same template part to a page twice will cause both to be removed from the page. Navigating through the page content (up and down arrows) may then also trigger the same bug noted in #22638.

To reproduce
Steps to reproduce the behavior:

  1. Go to the editor (page editor shown below) with full site editing experiment enabled.
  2. Add a template part.
  3. Add the same template part again.
  4. See that both template parts are removed from the page. Scroll (up and down arrows) through page content to see some 'funky' behavior and additionally trigger dirty state of the template part to have cleared all of its content (second part likely related to Removing a Template Part dirties the entity state with inner content removed. #22638) .

Expected behavior
Expected both template parts to remain (previous behavior). Or if we are iterating to prevent that, at least 1 should remain and a notification should occur.

Screenshots
duplicate-template-part

Since this is a recent regression, perhaps @epiqueras, @youknowriad, @noahtallen, @vindl, @ockham, or others may have an idea of where this could originate from?

Metadata

Metadata

Assignees

Labels

[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions