We have noticed an issue that when scrolled down on the edit menu page and you attempt to add a menu item you get a message that states: 'A server error occurred'.
The issue is in fact not a server side issue but an issue on the client side, when the error occurs a JS error is produced:
And this is the offending line (BaseElementIndex.js:1657):
const maxScrollTop = this.$main.offset().top - headerContainerHeight;
The issue appears to be the fact that on the menu edit page, there is not an element with the class 'main' which is what 'this.$main' is meant to refer to. If I modify 'src/templates/navs/_build.html' and add a main class:
The issue then resolves itself and once a menu item is added the browser jumps back to the top.
Describe the bug
Hi,
We have noticed an issue that when scrolled down on the edit menu page and you attempt to add a menu item you get a message that states: 'A server error occurred'.
https://github.com/user-attachments/assets/c871e7bd-3380-49d4-8ffc-5a1e264d4d6b
The issue is in fact not a server side issue but an issue on the client side, when the error occurs a JS error is produced:
And this is the offending line (BaseElementIndex.js:1657):
const maxScrollTop = this.$main.offset().top - headerContainerHeight;
The issue appears to be the fact that on the menu edit page, there is not an element with the class 'main' which is what 'this.$main' is meant to refer to. If I modify 'src/templates/navs/_build.html' and add a main class:
The issue then resolves itself and once a menu item is added the browser jumps back to the top.
https://github.com/user-attachments/assets/c546bf3e-774f-4bf5-9e20-19976d2ea173
Steps to reproduce
Craft CMS version
5.2.6
Plugin version
3.0.2
Multi-site?
No
Additional context
No response