Repository navigation
Description
Impacted plugin
Jetpack
Quick summary
I just updated my plugins and I notice that I'm getting a _doing_it_wrong() warning:
Function WP_Block_Type_Registry::register was called incorrectly. Block type "core/video" is already registered. (This message was added in version 5.0.0.)
I traced this down to the VideoPress module:
jetpack/projects/plugins/jetpack/modules/videopress/class.videopress-gutenberg.php
Lines 123 to 130 in 44f89f6
| public function register_video_block_with_videopress() { | |
| Blocks::jetpack_register_block( | |
| 'core/video', | |
| array( | |
| 'render_callback' => array( $this, 'render_video_block_with_videopress' ), | |
| ) | |
| ); | |
| } |
The issue is that as of Gutenberg 21.4, the Video block is now registered as a dynamic block due to WordPress/gutenberg#70293. This will also be part of WordPress 6.9.
The VideoPress integration should be changed to using the render_block_core/video filter as opposed to attempting to define the underlying render_callback, which may be defined.
Aside: The filtering logic currently present in the render_video_block_with_videopress method should also be updated to use the HTML Tag Processor to update the src more reliably!
Steps to reproduce
- Update Gutenberg to the latest version.
- Look at PHP error log.
Site owner impact
Fewer than 20% of the total website/platform users
Severity
Minor
What other impact(s) does this issue have?
No revenue impact
If a workaround is available, please outline it here.
No response
Platform (Simple and/or Atomic)
Self-hosted
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
westonruter commentedon Aug 21, 2025
VideoPress's registering of the Video block in this way also appears to prevent its core block styles from being loaded. Commenting out the above code fixes a CSS issue on my blog, while also eliminating the
_doing_it_wrong()warning.westonruter commentedon Aug 21, 2025
Note also that I am not using VideoPress on my blog, so I'm confused why this Video block is getting registered in the first place.
jeherve commentedon Aug 21, 2025
Thanks for the report. This is something we also discovered yesterday on our end, but it's good to get a confirmation and a direction towards a fix! :)
Internal refererence: JETPACK-765
peterwilsoncc commentedon Sep 26, 2025
Work around for others hitting this bug an not using VideoPress:
Do not use this if you are using VideoPress on your site, it will go badly for you.
westonruter commentedon Sep 27, 2025
@peterwilsoncc I've fleshed this out into a standalone plugin which I've installed on my site:
helgatheviking commentedon Oct 9, 2025
Confirming that I am still seeing this error
iamtakashi commentedon Nov 10, 2025
I also see the warning, and when I activate Jetpack, it seems to break the video block in the content. I can no longer see the video block from core.
lancewillett commentedon Nov 18, 2025
Should be fixed with this change: #45967
westonruter commentedon Nov 18, 2025
@lancewillett can we be sure that the override won't run if VideoPress is not active on a site? It doesn't seem that PR currently accounts for that.
lancewillett commentedon Nov 18, 2025
Good idea to test for that case and make sure, Weston.