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

Site Editor: remove Convert to Classic Block recovery option since it produces an error #48991

Closed
bobbingwide opened this issue Mar 10, 2023 · 1 comment · Fixed by #49051
Closed
Assignees
Labels
[Block] Classic Affects the Classic Editor Block [Feature] Paste [Type] Regression Related to a regression in the latest release

Comments

@bobbingwide
Copy link
Contributor

Description

In the Site Editor I loaded a template that contained a block which contained unexpected or invalid content, therefore displayed the Attempt Block Recovery button and more options menu with Resolve, Convert to HTML and Convert to Classic Block.

Choosing Convert to Classic Block causes Uncaught Errors in the console.

Uncaught Error: Block type 'core/freeform' is not registered.

Proposed fix: The Convert to Classic Block menu item should not be offered in the Site Editor as the block is no longer available.

Step-by-step reproduction instructions

  1. Edit a template to introduce a block that will fail block validation in the Site Editor
  2. Open the Site Editor for this template
  3. See the Attempt Block Recovery message instead of the block
  4. Choose the More options menu ( ... )
  5. Choose the Convert to Classic Block item
  6. See the Uncaught Error message(s) in the console.

Screenshots, screen recording, code snippet

image

Environment info

  • WordPress 6.5-beta2
  • Gutenberg 15.3.1

In my scenario I was also using the the oik-blocks plugin to provide the Block info block that failed.
The block fails validation since it contains an <svg> tag with a viewbox attribute that Gutenberg wants to convert to viewBox.

I didn't spend much time looking for an existing bug since it's only recently that the code was implemented to disable the Classic Block in the Site Editor.

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

Yes

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

No

@kathrynwp kathrynwp added [Type] Enhancement A suggestion for improvement. [Feature] Paste [Block] Classic Affects the Classic Editor Block labels Mar 13, 2023
@annezazu annezazu moved this to 🐛 Punted to 6.2.1 in WordPress 6.2 Editor Tasks Mar 14, 2023
@annezazu
Copy link
Contributor

Adding this to 6.2 but for 6.2.1 consideration as it would be a great fix to have since the classic block doesn't work in the site editor.

@annezazu annezazu changed the title Convert to Classic Block recovery option produces Uncaught error in Site Editor Site Editor: remove Convert to Classic Block recovery option since it produces an error Mar 14, 2023
@Mamaduka Mamaduka added [Type] Regression Related to a regression in the latest release and removed [Type] Enhancement A suggestion for improvement. labels Mar 14, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Mar 14, 2023
@github-project-automation github-project-automation bot moved this from 🐛 Punted to 6.2.1 to ✅ Done in WordPress 6.2 Editor Tasks Mar 14, 2023
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Classic Affects the Classic Editor Block [Feature] Paste [Type] Regression Related to a regression in the latest release
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants