I had the Drupal Commerce module installed directly without using Composer.

Today I tried to update from Drupal 8.4.0 to Drupal 8.4.1 using Drush. I am getting the following error.

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

I cannot access my update.php page, as well as executing drush cr, drush updb. Please help me to solve this issue it is very urgent as it's my production site.

  • Do you have a backup? Just revert to the backup and troubleshoot the upgrade in a local dev environment. If you don't have a backup, you have to ask yourself why you are doing updates on production without a backup. Nov 2 '17 at 5:57
  • Though I have the backup, its one day old, and every day we add at least 10 contents, so we will lose it. That's why I am trying to get it back if possible.
    – user79200
    Nov 2 '17 at 7:16
  • This is a generic Drupal error message that is being reported by multiple people for multiple entity types recently. Some people have told me that truncating their cache tables fixed the problem. Worth researching, in any case. Nov 2 '17 at 22:45

Hm, as I can see you try to update site directly on production version?

In next steps i can describe process that i use while perform site and plugins update, so after all they may be helpful for you:

First rule, never perform updates directly on production site.

Second, start practicing virtualization for projects (docker, vagrant) for local development.

Third, start practicing Drush configuration management for synchronization between local, beta, production sites...

And most important, always use GIT.

Because your site is already broken, I can suggest you to make local version with previously working configuration and database, so after this you can perform updates on your local site and debug problems if they still exists.

For example, on local version you can make clean install of Drupal 8.40, and import untouched database from state where site work and all site data with modules (same versions used on site before they going down). This will provide you site before update to Drupal 8.41, but for future updates I need to suggest you to start using composer, because lot of dependencies for site lying in the vendor directory.

  • Well got your point, next time I will follow your procedures first. Thanks for the information. I am currently re-uploading the old content from the google cache for the meantime.
    – user79200
    Nov 2 '17 at 8:25

Your error shows that you updated Commerce without updating Entity API.

Did you run "composer update drupal/commerce --with-dependencies"?

Install drupal commerce using composer with all its dependencies. You can use below command for that -

composer require "drupal/commerce"

and then run composer update .

If still any packages are missing in your setup, then you can search for the respective package at - https://packagist.org/ and then install that using composer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy