Skip to content
Snippets Groups Projects

Changing menu bundle to current menu name is breaking menu structure.

2 files
+ 17
1
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 17
0
@@ -44,3 +44,20 @@ function taxonomy_menu_ui_update_9001() {
}
}
}
/**
* Changing menu bundle to current menu name is breaking menu structure
* https://www.drupal.org/project/taxonomy_menu_ui/issues/3501383
*/
function taxonomy_menu_ui_update_9002() {
$entities = \Drupal::entityTypeManager()
->getStorage('menu_link_content')
->loadMultiple();
foreach ($entities as $entity) {
if ($entity->get('bundle')->value !== 'menu_link_content') {
$entity->set('bundle', 'menu_link_content');
$entity->save();
}
}
}
Loading