[wp-trac] [WordPress Trac] #53566: Pass the asset path to the `_doing_it_wrong()` notice in `register_block_script_handle()`

WordPress Trac noreply at wordpress.org
Wed Feb 22 17:32:58 UTC 2023


#53566: Pass the asset path to the `_doing_it_wrong()` notice in
`register_block_script_handle()`
----------------------------------------------------+---------------------
 Reporter:  desrosj                                 |       Owner:  (none)
     Type:  defect (bug)                            |      Status:  new
 Priority:  normal                                  |   Milestone:  6.2
Component:  Script Loader                           |     Version:
 Severity:  normal                                  |  Resolution:
 Keywords:  good-first-bug has-patch needs-testing  |     Focuses:
----------------------------------------------------+---------------------

Comment (by ironprogrammer):

 Thanks, all, for the PR reviews and update!

 == Test Report

 Patch tested: https://github.com/WordPress/wordpress-develop/pull/2313
 since [https://github.com/WordPress/wordpress-
 develop/pull/2313/commits/749efcfd8880b2de069eac862c255127069ad94d
 749efcf] 👍🏻

 === Environment
 - Hardware: MacBook Pro Apple M1 Pro
 - OS: macOS 12.6.3
 - Browser: Safari 16.3
 - Server: nginx/1.23.3
 - PHP: 7.4.33
 - WordPress: 6.2-alpha-54642-src
 - CLI: WP-CLI 2.7.1
 - Theme: twentytwentythree v1.0
 - Active Plugins:
  - test_trac_53566
 ([https://gist.github.com/ironprogrammer/314c2d6af804043ec33841f72cbfca36
 test mu-plugin])

 === Actual Results
 - ✅ The `_doing_it_wrong()` notice is updated with the absolute path to
 the missing asset file. ''(Path shown is truncated for privacy.)''

   The asset file (../wp-content/mu-plugins/blocks/notice/missing-
 asset.asset.php) for the "script" defined in "unit-tests/test-block" block
 definition is missing.

 - ✅ Previous fatal error in patched `register_block_script_handle()` has
 been resolved.

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


More information about the wp-trac mailing list