You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a Video block in Gutenberg and pasting a YouTube URL in the "Insert from URL" field, Gutenberg automatically creates a YouTube block for it.
In the AMP Stories editor, this does not work, because YouTube videos are currently not allowed in Stories and thus we disabled the YouTube embed block. There's an error in the console:
It's probably the same issue when pasting video URLs from some other providers whose blocks we have disabled.
It looks like createUpgradedEmbedBlock does not at all check whether the block type is registered, so I think this is something we should report upstream.
When creating a Video block in Gutenberg and pasting a YouTube URL in the "Insert from URL" field, Gutenberg automatically creates a YouTube block for it.
In the AMP Stories editor, this does not work, because YouTube videos are currently not allowed in Stories and thus we disabled the YouTube embed block. There's an error in the console:
Here's where this happens:
https://github.com/WordPress/gutenberg/blob/ee7c19acf998d99455939dc2501a66179d82cd97/packages/block-library/src/video/edit.js#L95-L114
And here's the function in question:
https://github.com/WordPress/gutenberg/blob/ee7c19acf998d99455939dc2501a66179d82cd97/packages/block-library/src/embed/util.js#L61-L118
It's probably the same issue when pasting video URLs from some other providers whose blocks we have disabled.
It looks like
createUpgradedEmbedBlock
does not at all check whether the block type is registered, so I think this is something we should report upstream.First reported in #2394 (comment).
The text was updated successfully, but these errors were encountered: