publishpress / PublishPress-Blocks

PublishPress Blocks adds the missing blocks and configuration you need to build professional websites. Take the control of the new Gutenberg editor with user edition profile configuration and 20+ new blocks and options.
15 stars 8 forks source link

Blocks using metadata.name on their registration trigger error on PublishPress-Blocks #1366

Open coutojuli opened 7 months ago

coutojuli commented 7 months ago

Expected Behavior

PublishPress-Blocks plugin should display blocks independently of their registration method as long as the registration method is available on the WordPress documentation for the used WordPress version. Docs reference: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/

Current Behavior

Steps to Reproduce (for bugs)

  1. Create a block using npx @wordpress/create-blockhttps://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/
  2. Review the index.js and make sure the registerBlockType is using metadata.name or the block name directly.
  3. Open PublishPress-Blocks Block Permissions on the WP site.
  4. Open the console and check for errors. The error "The block {namespace/block-name} must have a title." appears on the console and the block doesn't appear on the list to be enabled or disabled.

Context

This issue blocks administrators from managing certain blocks depending on their registration method.

Your Environment

Multisite using WPVIP enterprise host.