- ๐ณ๐ฟNew Zealand danielveza Brisbane, AU
An alternate approach here would be to add validation logic to MenuLinkContentForm so these broken links couldn't be saved in the first place? What do people think?
- Merge request !12760Issue #3322217 by neptune-dc: Prevent circular menu links โ (Open) created by Unnamed author
- ๐ฏ๐ตJapan neptune-dc
When viewing a page with a menu link that links to itself, the menu link falls into a recursive loop during the access check.
Although we could certainly add logic to handle it as in the patch above, it was decided that it would be more appropriate to simply prevent such a menu link from being made.
I made an MR attempting to validate the url to prevent menu links from referencing themselves with an internal link.
Thank you for the detailed discussion and patch. As someone currently learning Drupal deeply, I found this issue really helpful in understanding how menu items and internal paths behave. I created a test menu item and observed how the system responds when a menu links to itself โ this was a great learning experience for me.
Appreciate the work and collaborative approach from everyone involved. Looking forward to learning more from these issues.
- ๐ฎ๐ณIndia abhijith s
abhijith s โ made their first commit to this issueโs fork.
- Merge request !12826#3322217: Menu infinite loop issue fix with test added โ (Open) created by abhijith s
- ๐ฎ๐ณIndia abhijith s
Created new MR with test since old MR was throwing some errors.
- ๐บ๐ธUnited States smustgrave
There was already an MR with a different solution, why the pivot