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

WordPress Trac noreply at wordpress.org
Mon Jul 7 14:59:30 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        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by Bernhard Reiter):

 This is expected behavior. The crucial part is that the anchor block is
 inserted ''after'' the plugin that contains the hooked block is activated.
 If that order is reversed (i.e. a post containing the anchor block is
 created ''before'' the plugin is activated), the hooked block should be
 inserted correctly. @leewillis77 Would you mind testing that order?
 (You'll need to temporarily disable the plugin when inserting the anchor
 block into a post.)

 This behavior was originally due to technical reasons, but we eventually
 decided that it made enough sense from a UX perspective for us not to
 change it (which would've been fairly complicated). The underlying idea is
 that Block Hooks were always meant as a way to auto-insert blocks upon
 plugin activation into existing layout and content, but not necessarily if
 a user adds a new anchor block "after the fact" (at which point they can
 arguably also add the otherwise hooked block while they're in the editor).

 @leewillis77 Is that an acceptable limitation for your use case, or does
 it make Block Hooks unviable for you?

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


More information about the wp-trac mailing list