[wp-trac] [WordPress Trac] #65039: _doing_it_wrong messages in WP_Block_Type_Registry::register() lack context
WordPress Trac
noreply at wordpress.org
Wed Jun 3 05:18:38 UTC 2026
#65039: _doing_it_wrong messages in WP_Block_Type_Registry::register() lack context
--------------------------+--------------------------
Reporter: benjgrolleau | Owner: westonruter
Type: enhancement | Status: closed
Priority: normal | Milestone: 7.1
Component: Editor | Version: 5.0
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
--------------------------+--------------------------
Changes (by westonruter):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"62452" 62452]:
{{{
#!CommitTicketReference repository="" revision="62452"
Blocks: Include the offending block name in registration error notices.
Three of the four `_doing_it_wrong()` calls in
`WP_Block_Type_Registry::register()` emitted a generic message that did
not identify which block name triggered it, making it hard to locate the
offending registration. The notices for non-string names, uppercase
characters, and a missing namespace prefix now include the received value
(the type via `gettype()` for non-strings, and the escaped name
otherwise), matching the existing "already registered" notice that did
already report the name.
Developed in https://github.com/WordPress/wordpress-develop/pull/11478.
Follow-up to r44108.
Props manishxdp, desrosj, benjgrolleau, westonruter.
Fixes #65039.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65039#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list