Skip to content
Snippets Groups Projects

Update file MenuParentFormSelector.php

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -85,7 +85,7 @@ public function parentSelectElement($menu_parent, $id = '', ?array $menus = NULL
@@ -85,7 +85,7 @@ public function parentSelectElement($menu_parent, $id = '', ?array $menus = NULL
'#type' => 'select',
'#type' => 'select',
'#options' => $options,
'#options' => $options,
];
];
if (!isset($options[$menu_parent])) {
if (strpos($menu_parent, ':') !== FALSE && !isset($options[$menu_parent])) {
// The requested menu parent cannot be found in the menu anymore. Try
// The requested menu parent cannot be found in the menu anymore. Try
// setting it to the top level in the current menu.
// setting it to the top level in the current menu.
[$menu_name] = explode(':', $menu_parent, 2);
[$menu_name] = explode(':', $menu_parent, 2);
Loading