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

Navigation: Deleting the Page List block with the Delete key crashes its parent Navigation Block #31930

Closed
priethor opened this issue May 18, 2021 · 2 comments
Labels
[Block] Navigation Affects the Navigation Block [Block] Page List Affects the Page List Block [Type] Bug An existing feature does not function as intended

Comments

@priethor
Copy link
Contributor

priethor commented May 18, 2021

Description

When deleting the Page List block within a Navigation block with the Delete key, if it is the only child block, the parent Navigation block crashes:

Step-by-step reproduction instructions

  1. Add a Navigation block
  2. Click on "Add all pages"
  3. Select the recently added Page List block
  4. Delete it with the Delete key

This doesn't reproduce if:

  • There are/were other blocks in the Navigation block.
  • The Page List block is deleted through the toolbar option.
  • Any other block is deleted following these steps.

Expected behaviour

To see an empty Navigation in its placeholder state.

Actual behaviour

The block has encountered an error and cannot be previewed, with the following console error:

Error: An error occurred while running 'mapSelect': Cannot read property 'title' of undefined
The error may be correlated with this previous error:
TypeError: Cannot read property 'title' of undefined

Screenshots or screen recording (optional)

Grabacion.de.pantalla.2021-05-18.a.las.11.28.47.mov

WordPress information

  • WordPress version: 5.7.1
  • Gutenberg version: 10.6.0
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? No (Kadence)
@priethor priethor added [Type] Bug An existing feature does not function as intended [Block] Navigation Affects the Navigation Block [Block] Page List Affects the Page List Block labels May 18, 2021
@talldan
Copy link
Contributor

talldan commented May 18, 2021

I think this is the same issue as #29498

@priethor
Copy link
Contributor Author

Thanks, closing this as duplicate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Block] Page List Affects the Page List Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants