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

Derivative embed blocks in post type templates should be recognized and converted on the fly when creating a new post #26137

Closed
coreymckrill opened this issue Oct 15, 2020 · 0 comments · Fixed by #26147
Labels
[Block] Embed Affects the Embed Block [Type] Bug An existing feature does not function as intended

Comments

@coreymckrill
Copy link
Contributor

Describe the bug

If a post type template contains an old embed block for a specific platform (e.g. WordPress TV), the editor will crash with a WSOD when trying to create a new post, essentially as described in #21718.

To reproduce

  1. Register a new post type and give it a template like:
    'template' => [
        [ 'core-embed/wordpress-tv' ],
    ]
    
  2. Navigate to the Add New screen for that post type.
  3. You should get a White Screen Of Death. If you view the browser console, you'll see an error:
    Uncaught (in promise) Error: Block type ‘core-embed/wordpress-tv’ is not registered.
    

Expected behavior

I would expect the editor to be able to recognize and convert the old WordPress TV embed block into the new Embed block with the WordPress TV block variation, as happens here.

Editor version:

  • WordPress version: 5.6-alpha-49153
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? default

Desktop (please complete the following information):

  • OS: MacOS 10.15.7
  • Browser: Firefox
  • Version: 81.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Embed Affects the Embed Block [Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants