Closed MoritzLost closed 1 year ago
Good call, and possibly going to need some help from Craft on this one.
With the new events added in Craft 4.5 it should now be possible to address this issue, right? 🌞
So, sort of. The only thing I'm not overly happy about is that when moving the element and it's invalid, you'll get an A server error occurred.
error message, and not something more meaningful. There's not much we can do about that.
Added for the next release (for Craft 4.5+ only). To get this early, run composer require verbb/navigation:"dev-craft-4 as 2.0.21"
.
@engram-design Thanks! Yeah I agree, showing a meaningful error message would be preferable.
Updated in 2.0.22
Describe the bug
The Max Nodes per Level can be easily bypassed by dragging a nested item to a new position. For example, we have a limit of three nodes for level one. This prevents the editor from adding more nodes through the sidebar. However, a nested entry (level 2 or lower) can be moved to level 1 using drag-and-drop without problems. When a node is moved to a level where it's not allowed like this, all nodes on that level can't be saved because they encounter a validation error due to the nodes limitation.
Setting a node to a level where no more nodes are allowed using drag-and-drop should be prevented.
Steps to reproduce
Craft CMS version
4.4.13
Plugin version
2.0.18
Multi-site?
No response
Additional context
No response