Skip to content

Commit

Permalink
Merge branch 'hotfix/fix_be_navigation' into 'release/2.3.0'
Browse files Browse the repository at this point in the history
Fix backend navigation

See merge request metamodels/core!338
  • Loading branch information
zonky2 committed Sep 23, 2024
2 parents 1c920b8 + 36683bf commit fb64e0f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CoreBundle/EventListener/BackendNavigationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ private function getSectionNode(

// Search the position in the already existing menu by starting at offset in BE_MOD and walking up to the start.
$start = (int) array_search($backendSection, $navigation, true);

// Special location for node zero.
if (0 === $start) {
array_splice($namesInMenu, 0, 0, [$backendSection]);
}

while (0 <= --$start) {
/** @psalm-suppress InvalidArrayOffset */
if (in_array($navigation[$start], $namesInMenu, true)) {
Expand Down

0 comments on commit fb64e0f

Please sign in to comment.