Navigation block: JS error when the block is placed inside a template part #52680
Labels
[Block] Navigation
Affects the Navigation Block
[Type] Bug
An existing feature does not function as intended
Description
I am only able to reproduce this with Wp 6.3. current nightly and Gutenberg current trunk.
I have not tested in other themes than Twenty Twenty-Three.
In the Site editor,
When adding a navigation block inside a template part, and hovering over the Navigation menu in the block settings sidebar: (The three dots next to the text "Menu" in the first tab of the block settings),
I see this JS error in the console:
react-dom.min.js?ver=18:1 Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Brendered%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at ct (react-dom.min.js?ver=18:1:41145)
at p (react-dom.min.js?ver=18:1:42914)
at g (react-dom.min.js?ver=18:1:44061)
at e (react-dom.min.js?ver=18:1:46125)
at dr (react-dom.min.js?ver=18:1:54774)
at $s (react-dom.min.js?ver=18:1:122387)
at Sl (react-dom.min.js?ver=18:1:88649)
at kl (react-dom.min.js?ver=18:1:88577)
at bl (react-dom.min.js?ver=18:1:88440)
at sl (react-dom.min.js?ver=18:1:85264)
Step-by-step reproduction instructions
In the site editor, select an existing template part or create a new.
Add a navigation block as a direct child. It has to be a direct child: if you place the navigation block inside a group block first, the JS error does not appear. If you wrap the navigation block after placement, the JS error dissapears.
With the navigation block selected, hover over the first ellipsis menu in the first tab of the block settings sidebar, and see the JS error.
Screenshots, screen recording, code snippet
js-error.mp4
Environment info
Active plugin: Beta tester. Gutenberg current trunk
WP 6.3-beta4-56243
nginx
PHP 8.1.9., 8.0.2 (tested on two different installations, with and without demo content)
Mac OS 13.4.1
Chrome 114.0.5735.198
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: