Drupal Answers Asked by ashutoshsngh on December 31, 2021
Facing one issue in deleting the menu items on my Drupal 8 Site.
Steps to reproduce:
Add a link to main menu.
Create Child terms under one link.
Delete the parent term.
After deleting the parent link child links stays they don’t get deleted
automatically.
If you want to edit/manually delete those links then a Fatal error is
coming.
Error Message : DrupalComponentPluginExceptionPluginNotFoundException: Plugin ID ‘menu_link_content:adad91f8-19c7-48c7-a88e-67aae4edd21e’ was not found. in DrupalCoreMenuMenuLinkManager->getDefinition() (line 207 of /var/www/crain-platform/docroot/core/lib/Drupal/Core/Menu/MenuLinkManager.php).
After doing some debugging i see the menu data missing from menu_link_content table.Anyone have any idea why this is coming and how to fix this issue?
This error was coming because of responsive menu module.Responsive menu was fetching the parent links using
Drupal::service('plugin.manager.menu.link')->createInstance($parent);
Adding the condition before calling createInstance will fix this issue.
Drupal::service('plugin.manager.menu.link')->hasDefinition($parent)
Created a issue on D.o also
Answered by ashutoshsngh on December 31, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP