Main menu inaccessible after disabling Taxonomy Menu

Created on 12 September 2019, about 5 years ago
Updated 7 August 2023, over 1 year ago

When I uninstalled Taxonomy Menu, various pages end up with "The website encountered an error" white screen of death.

I had the Main Navigation set to use Taxonomy Menu. When I uninstalled TM, the main nav edit page now throws an error. Clearing caches doesn't help. I replicated this on another server (earlier copy of the same site).

I marked this a critical, because it results in data loss - I basically have to rebuild the main navigation in a new menu and then use the new menu in all blocks and so forth. And if I accidentally do anything that involves the main menu, I get a "website encountered an unexpected error" white screen.

I've reloaded a backup database and did a drush cache rebuild and tried a few sequences.

  1. delete the menu in taxonomy admin (menus admin becomes inaccessible)
  2. uninstall the module without deleting the taxonomy menu entry (main nav admin page becomes inaccessible)
  3. remove the Main Navigation block, remove the checkbox on any content types to add that content to the Main Navigation, delete the Taxonomy Menu menu for Main, and then uninstall the Taxonomy Menu module.

So far, everything I try results in crashing part or all of the site. I can't find a safe uninstall sequence for Taxonomy Menu

I've gotten various error messages, but here's the most recent

Drupal\Component\Plugin\Exception\PluginException: Plugin (taxonomy_menu.menu_link:taxonomy_menu.menu_link.main_menu.225) instance class "Drupal\taxonomy_menu\Plugin\Menu\TaxonomyMenuMenuLink" does not exist. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 97 of C:\laragon\www\beercants\web\core\lib\Drupal\Component\Plugin\Factory\DefaultFactory.php).

If I manually go into the menu_tree table and remove entries that contain "taxonomy_menu" in the `id` field, everything seems to come back to life.

So as an example, an entry with the following is the type I'm deleting

menu_name: main
mlid: 86
id: taxonomy_menu.menu_link:taxonomy_menu.menu_link.main_menu.225

So should Taxonomy Menu be cleaning up all the rows with ids tath start with taxonomy_menu?

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ergophobe

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024