Make WordPress Core

Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#60460 closed enhancement (fixed)

Editor: Make asset registration .asset.php optional for blocks

Reported by: gziolo's profile gziolo Owned by:
Milestone: 6.5 Priority: normal
Severity: normal Version: 5.5
Component: Editor Keywords: has-patch has-unit-tests add-to-field-guide
Focuses: Cc:

Description (last modified by gziolo)

A related issue in Gutenberg:

It is a hard requirement that a *.asset.php file is present to register a block in WordPress. Otherwise, it throws a Warning:

function register_block_script_handle was called incorrectly. The asset file (/wp-content/uploads/faustwp/blocks/block-a/index.asset.php) for the "editorScript" defined in "create-block/block-a" block definition is missing. (This message was added in version 5.5.0.)

and the block will not appear in the inserter.

Change History (6)

#1 @gziolo
2 months ago

  • Description modified (diff)

This ticket was mentioned in PR #5799 on WordPress/wordpress-develop by @JoeFusco.

2 months ago

  • Keywords has-patch has-unit-tests added

#4 @gziolo
2 months ago

  • Resolution set to fixed
  • Status changed from new to closed

@colorful tones commented on PR #5799:

2 months ago

Thanks for getting this over the line @gziolo and thanks @josephfusco for kicking it off 🙌

#6 @stevenlinx
2 months ago

  • Keywords add-to-field-guide added
Note: See TracTickets for help on using tickets.