Closed sander-lameco closed 11 months ago
Fixed for the next release. To get this early, run composer require verbb/navigation:"dev-craft-4 as 2.0.22"
.
@engram-design I'm not sure if this is introducing a new bug or I am missing something after doing the composer require step. I did clear all caches just in case but when I try to add a (few) pages from the modal it will give me this console error:
Uncaught TypeError: Cannot read properties of undefined (reading '$body')
at s.constructor.onElementModalSelect (navigation.js:135:54)
at Object.o [as onSelect] (jquery.js?v=1701249302:2:89408)
at s.constructor.onSelect (BaseElementSelectorModal.js:353:21)
at s.constructor.selectElements (BaseElementSelectorModal.js:308:14)
at s.constructor.<anonymous> (Base.js:153:23)
at HTMLButtonElement.o (jquery.js?v=1701249302:2:89408)
at HTMLButtonElement.dispatch (jquery.js?v=1701249302:2:43392)
at v.handle (jquery.js?v=1701249302:2:41387)
at Object.trigger (jquery.js?v=1701249302:2:72081)
at HTMLButtonElement.<anonymous> (jquery.js?v=1701249302:2:72677)
Ah, slightly unrelated error, but also fixed for the next release. To get this early, run composer require verbb/navigation:"dev-craft-4 as 2.0.22"
.
Fixed in 2.0.23
Describe the bug
We have a navigation setup with the following config:
Max Nodes per Level
Level 1
4
Now when the max nodes for level 1 is reached and we try to move one of the items as a child of one of the others we get the "A server error occurred` message. I went and checked the web.log but no errors where logged.
After debugging a bit I noticed when I delete one of the level 1 items and then moving another as a child of yet another one the error isn't triggered. After that I removed the
Max Nodes per Level
to see if it was the cause and it is. One thing I also noticed is the error only happens when you move an item to the first child position of another item.Steps to reproduce
Max Nodes per Level
forLevel 1
set to4
(or any other number)Craft CMS version
4.5.11.1
Plugin version
2.0.22
Multi-site?
No
Additional context
No response