Closed
Description
Bug Description
The core navigation block enqueues a script for the block, creating an invalidation in the core.
The error is reproducible with Twenty Twenty-Two and Twenty Twenty-three theme
{
"node_name": "script",
"parent_name": "head",
"code": "DISALLOWED_TAG",
"type": "js_error",
"node_attributes": {
"src": "http://one.wordpress.test/wp-includes/blocks/navigation/view-modal.min.js?ver=__normalized__",
"id": "wp-block-navigation-view-2-js"
},
"node_type": "ELEMENT",
"sources": [
{
"type": "core",
"name": "wp-includes",
"file": "blocks/navigation.php",
"line": 668,
"function": "register_block_core_navigation",
"hook": "init",
"priority": 10,
"dependency_type": "script",
"handle": "wp-block-navigation-view-2"
},
{
"type": "core",
"name": "wp-includes",
"file": "blocks/template-part.php",
"line": 15,
"function": "render_block_core_template_part",
"dependency_type": "script",
"handle": "wp-block-navigation-view-2"
},
{
"type": "core",
"name": "wp-includes",
"file": "script-loader.php",
"line": 2127,
"function": "wp_print_head_scripts",
"hook": "wp_head",
"priority": 9
}
],
"removed": true,
"reviewed": false
}
However, the menu toggle is working on AMP pages.
Expected Behaviour
The Core and Core themes should not create validation issues
Screenshots
PHP Version
7.4.3
Plugin Version
2.3.0
AMP plugin template mode
Standard, Transitional
WordPress Version
6.1-RC3
Site Health
No response
Gutenberg Version
No response
OS(s) Affected
No response
Browser(s) Affected
No response
Device(s) Affected
No response
Acceptance Criteria
No response
Implementation Brief
No response
QA Testing Instructions
No response
Demo
No response
Changelog Entry
No response