Error when attempting to uninstall module

Created on 17 June 2016, about 8 years ago
Updated 1 May 2023, about 1 year ago

Getting white screen after attempting to uninstall the commerce module on drupal 8.1.1 Has anyone seen this error before, and possible point me a direction. Lost trying to fix this.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "commerce_product" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 125 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

πŸ› Bug report
Status

Closed: won't fix

Component

Other

Created by

πŸ‡ΊπŸ‡ΈUnited States thronedigital

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • πŸ‡ͺπŸ‡ΈSpain idiaz.roncero Madrid

    In case this resurfaces, I had the same problem with an old Commerce install I wanted to get rid of.

    After uninstall, there are two remaining entries on key_value database that provoke WSOD when accessing entities / fields. In my case the error was started by layout builder derivative blocks.

    Solution on #5 works.

    This is an image of the remaining entries, in case it's of some help:

  • πŸ‡ΊπŸ‡ΈUnited States allisonc New York

    I fixed this issue based on #7

    1. DELETE FROM key_value WHERE name like '%commerce_product%'
    2. Run https://site.com/rebuild.php
  • πŸ‡ΊπŸ‡ΈUnited States jghyde

    More ideas to solve (I had a pesky commerce_product entity not found problem that took 2 days to figure out).

    1. Look for instances of "commerce_product" (or known entity name) in your installation with grep.
    From the top directory of the Drupal installation (web or docroot or whatever you called it)
    grep -inRsH 'commerce_product' .
    Look at any theme or *.theme file that has the offending entity. Look at modules or custom modules that require or reference it. Edit the code and get rid if it!

    2. Look through your *./config/sync directory or search it grep -inRsH 'commerce_product' . looking for the field.

    3. What I found was a config that made the flag module require it. Ended up solving by wiping out the config and drush pmu flag.

    4. drush cim is your friend. Edit the *./config/sync directory and drush cim to make it live on your site!

    5. Delete or truncate the contents of the key_value database table as needed.

    6. drush cr a bunch!

    7. See if you can configure using Sequel Pro on MacOS to speed the database stuff up.

    8. If you delete something out of the serialized array inside the config table, remember that the first number at the beginning of that god awful string of poop is the number of modules installed. You have to also change that number (de-increment or make it be less than the original number in accordance with how many modules you deleted from the serialized array.)

    9. load the original database in a second DB on the same server. You can switch back and forth looking at the original DB content (or export it easily using Sequel Pro).

    10. Don't tell me what I did wrong. I am tired of developer-centric egos. I have a business to run and lose money running down dev ops rabbit holes. These ideas will help many solve this problem even it it isn't "the correct way."

Production build 0.69.0 2024