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

Reusable block: Crash when trying to convert to regular blocks a undefined/deleted reusable block #5723

Closed
fluiddot opened this issue May 4, 2023 · 0 comments · Fixed by WordPress/gutenberg#50475

Comments

@fluiddot
Copy link
Contributor

fluiddot commented May 4, 2023

Sentry event: https://a8c.sentry.io/share/issue/1088c69e108447dda510460e139d0cb0/

Describe the bug
A crash is produced when converting to regular blocks an undefined or deleted reusable block. Undefined/deleted reusable blocks shouldn't allow this option so we need to remove it.

To Reproduce
Steps to reproduce the behavior:

  1. Add an undefined reusable block. This can be done by adding the following HTML code to a post:
<!-- wp:block {"ref":-1} /-->
  1. Observe that the block displays a message stating that is deleted or unavailable.
  2. Select the block.
  3. Tap on the three dots button to open the block options.
  4. Tap on "Convert to regular blocks".
  5. Observe that the app crashes.

Expected behavior
The "Convert to regular blocks" shouldn't be available on undefined/deleted reusable blocks.

Screenshots
N/A

Smartphone (please complete the following information):

  • Device: iPhone 11
  • OS: iOS 15.4.1
  • Version 22.3.0.1

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant