View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007741 | OXID eShop (all versions) | 2. ----- eShop backend (admin) ----- | public | 2024-11-08 11:10 | 2024-11-08 14:08 |
Reporter | tode | Assigned To | |||
Priority | low | Severity | minor | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Product Version | 7.1.0 | ||||
Summary | 0007741: Opened admin navigation entries are not closing when other subnavigation entries are opened (with more than one main navigation) | ||||
Description | Default: If a main menu is opened in the navigation sidebar in the OXID Admin menu, already opened main menus are automatically closed. Problem in OXID 7.x: If another (ox)menu is created via menu.xml, its main menus are not closed automatically. The reason lies in the new structure of navigation.html.twig. The ‘nav-x’ ids of the main menus for defined menus are doubled because the menu counter in the menu loop is reset to 0 for each additional menu. The JS for closing the menus cannot process the IDs uniquely. The structure in navigation.tpl up to OXID 6.5 is fundamentally different and the above-mentioned problem does not occur here. Suggested solution: The following adaptation of navigation.html.twig - Remove line 40 ({% set menuIndex = 0 %}) - Replace lines 3 and 4: old: {% set historyMenu = ‘nav-2’ %} {% set favouritesMenu = ‘nav-3’ %} new: {% set historyMenu = ‘nav-’ ~ (menuCount + 1) %} {% set favouritesMenu = ‘nav-’ ~ (menuCount + 2) %} - Insert the following before line 1: {% set menuCount = menustructure.count() %} {% set menuIndex = 0 %} | ||||
Steps To Reproduce | In the menu.xml (standard or via module), create another OXMENU entry (menu) with several MAINMENU (main menus) and at least one SUBMENU (submenu) per main menu. In OXID Admin, click on a new main menu entry from the new menu and open it. Then click on another main menu entry (whether from the standard or new menu) and open it. The previously opened new main menu entry from the new menu does not close. | ||||
Tags | Admin, Admin Template, Menu, Navigation | ||||
Attached Files | |||||
Theme | Not defined | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||