[wp-trac] [WordPress Trac] #63608: Hooked blocks not inserted

WordPress Trac noreply at wordpress.org
Fri Jun 20 13:55:06 UTC 2025


#63608: Hooked blocks not inserted
--------------------------+-----------------------------
 Reporter:  leewillis77   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  6.8
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hooked blocks (whether registered via block.json or the hooked_block_types
 filter) are registered correctly, but are not inserted.

 To reproduce:
 - Create a new block plugin using `npx @wordpress/create-block copyright-
 date-block --template @wordpress/create-block-tutorial-template`
 - Edit the block.json (copyright-date-block/src/block.json) and add the
 following:
 `"blockHooks": {"core/post-author": "after"},`
 - Build the plugin using `npm run build`
 - Log into WordPress and activate the Copyright Date Block plugin
 - Create a new post or page, insert the "Author" block into the content
 and save the post

 At this point, the copyright date block should have been automatically
 added after the author block, however that doesn't happen.

 The post content in the database will look something like this:

 {{{
 <!-- wp:post-author {"metadata":{"ignoredHookedBlocks":["create-block
 /copyright-date-block"]}} /-->
 }}}

 ie, the ignoredHookedBlocks metadata has been added, but the actual block
 has not.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63608>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list