[wp-trac] [WordPress Trac] #58660: Block editor fails to initialize when loading minified scripts
WordPress Trac
noreply at wordpress.org
Wed Jun 28 19:49:43 UTC 2023
#58660: Block editor fails to initialize when loading minified scripts
--------------------------+---------------------
Reporter: azaozz | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: 6.3
Component: Editor | Version: trunk
Severity: blocker | Resolution:
Keywords: has-patch | Focuses:
--------------------------+---------------------
Comment (by ironprogrammer):
== Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/4742
=== Steps to Reproduce or Test
1. Check out PR branch.
2. Run `npm install && npm run build:dev`.
3. In `wp-config.php`, set `SCRIPT_DEBUG` to `false`.
4. Load the editor in a post or site editor.
=== Expected Results
- ✅ The editor should load without error.
=== Environment
- Hardware: MacBook Pro Apple M1 Pro
- OS: macOS 13.4.1
- Browser: Safari 16.5.1, Google Chrome 114.0.5735.133
- Server: nginx/1.25.0
- PHP: 7.4.33
- WordPress: 6.3-alpha-56078-src
=== Actual Results
- ✅ Editor loads without PHP errors.
=== Additional Information
- The following JS warnings were logged in the console when `SCRIPT_DEBUG`
is `false`:
DevTools failed to load source map: Could not load content for http://wp-
src.test/wp-admin/hooks.js.map: Unexpected token '<', "<!DOCTYPE "... is
not valid JSON
DevTools failed to load source map: Could not load content for http://wp-
src.test/wp-includes/js/underscore-umd.js.map: Unexpected token '<',
"<!DOCTYPE "... is not valid JSON
was added to the iframe incorrectly. Please use block.json or
enqueue_block_assets to add styles to the iframe.
`<link rel="stylesheet" href="http://wp-src.test/wp-admin/load-
styles.php?c=0&dir=ltr&load%5Bchunk_0%5D=dashicons,admin-bar,wp-
components,wp-block-editor,wp-reusable-blocks,wp-editor,common,forms,wp-
reset-editor-styles,wp-block-libr&load%5Bchunk_1%5D=ary,wp-block-
editor-content,wp-edit-blocks,wp-edit-site,wp-format-library,buttons
,media-views,wp-block-directory,admin-
menu,dash&load%5Bchunk_2%5D=board,list-
tables,edit,revisions,media,themes,about,nav-menus,wp-pointer,widgets
,site-icon,l10n,wp-auth-check&ver=6.3-alpha-56078-src" media="all">`
- When `SCRIPT_DEBUG` is set to `true`, only the `underscore-umd.js.map`
notice remains.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58660#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list