[wp-trac] [WordPress Trac] #53026: register_block_type_from_metadata fails if path points to a JSON file that is not named "block.json"

WordPress Trac noreply at wordpress.org
Mon Apr 26 18:06:11 UTC 2021


#53026: register_block_type_from_metadata fails if path points to a JSON file that
is not named "block.json"
--------------------------+------------------------------
 Reporter:  artifacts     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:  5.5
 Severity:  normal        |  Resolution:
 Keywords:  2nd-opinion   |     Focuses:
--------------------------+------------------------------
Changes (by desrosj):

 * keywords:   => 2nd-opinion
 * version:  trunk => 5.5
 * component:  General => Editor


Comment:

 Welcome to Trac, @artifacts!

 Thanks for this report. You are correct and I am able to confirm this
 behavior. Looks like [48141] introduced the issue in 5.5.

 Before a fix can be created, I'd like to get some feedback from some
 editor contributors that would know more about the background of this.

 Specifically, I'd like clarity on whether it is preferred that block files
 always be named `block.json` and this was meant to enforce this as a best
 practice (the docs should be updated to be more clear in this case), or if
 this is an oversight and any name is permitted for the JSON file (the code
 needs to be corrected).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53026#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list