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 block: Handle invalid ref IDs #42928

Closed
scruffian opened this issue Aug 3, 2022 · 1 comment
Closed

Navigation block: Handle invalid ref IDs #42928

scruffian opened this issue Aug 3, 2022 · 1 comment
Labels
[Block] Navigation Affects the Navigation Block

Comments

@scruffian
Copy link
Contributor

What problem does this address?

If a navigation block uses a ref ID, and the associated navigation CPT is deleted, the block won't be able to display the previously valid navigation CPT.

What is your proposed solution?

In this case the block should behave in the way as an empty block would, falling back to another navigation CPT if one is available, or Page List if there are no navigation CPTs.

We should ensure the same behaviour exists in both the editor and the frontend.

@draganescu
Copy link
Contributor

I think this is solved by #42735 because that PR adds this behavior:

  • If a navigation block uses a block menu with ref X,
  • and the associated navigation CPT is deleted,
  • makinf X point to nothing
  • the block will display a message that the menu is deleted
  • and invite the user to create a new one

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
Projects
None yet
Development

No branches or pull requests

2 participants