verbb / navigation

A Craft CMS plugin to create navigation menus for your site.
Other
90 stars 22 forks source link

Drag and drop not respecting Max nodes per Level setting #398

Closed EKBenI closed 1 month ago

EKBenI commented 1 month ago

Describe the bug

Navigation: 2.0.28 Craft CMS: 4.10.5

Max nodes per level is set to 2 in the Navigation's settings: image

Nodes can still be dragged/dropped into the parent node more than the allowed limit: image

Attempting to drag the node back to the top level (or below another parent node) results in a server error message: image

The node then has to be deleted and recreated to be placed in the desired level/order.

Adding nodes using the dropdown menu respects the rules set in the settings - the issue is encountered with the drag/drop functionality.

Please see: https://www.loom.com/share/32e4cc3703334f928290d3175193e024

Steps to reproduce

  1. Set a limit on the Max nodes per level setting in the Navigation's settings.
  2. Drag/drop node below a parent node that already has the maximum number of nodes.
  3. Drag/drop the node to another location/level.

Craft CMS version

4.10.5

Plugin version

2.0.28

Multi-site?

No

Additional context

No response

engram-design commented 1 month ago

Fixed for the next release. To get this early, run composer require verbb/navigation:"dev-craft-4 as 2.0.28".

engram-design commented 1 month ago

Fixed in 2.1.0