Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Structure max level limit ignored when dragging collapsed structure #15310

Closed
rogerdawkins opened this issue Jul 5, 2024 · 2 comments
Closed
Labels

Comments

@rogerdawkins
Copy link

What happened?

Description

NOTE: This issue affects Craft 4 and Craft 5

I have created a Structure with Max Levels set to 2. If a top level entry (level 1) has a child entry it should not be possible to drag it below another level 2 item as it will generate a third level. As per the image below if Top B is dragged below Top A it is blocked correctly.

Screenshot 2024-07-05 at 18 22 44

However, if on the above scenario, the Top A entry is collapsed, as per the image below, then it can be moved.

Screenshot 2024-07-05 at 18 29 58

This then results in a Structure that is 3 levels deep which should not be allowed. Subsequently a 3 levels collapsed structure can be dragged again to create a 4 level deep structure, etc.

Screenshot 2024-07-05 at 18 31 58

Steps to reproduce

  1. Create a Structure with Max Levels = 2
  2. Follow the images above to reproduce the issue.

Expected behavior

It should not be possible to create a 3 level deep structure by dragging. The Move should be blocked.

Actual behavior

Multiple levels can be created by dragging a collapsed structure.

Craft CMS version

5.2.5

PHP version

8.2.20

Operating system and version

Linux 6.5.0-42-generic

Database type and version

MySQL 8.0.36

Image driver and version

No response

Installed plugins and versions

@brandonkelly
Copy link
Member

Thanks for reporting that! Fixed for the next Craft 4 and 5 releases.

@brandonkelly
Copy link
Member

Craft 4.10.5 and 5.2.6 are out now with that fix. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants