Error: Class 'Drupal\entity_update\Commands\EntityUpdate' not found

Created on 9 December 2021, almost 3 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

Drupal version: 9.2.9
Drush version: 10.6.1

On a playground site I have been experimenting setting up a module that provides install configuration for a custom content type, I have been renaming fields and config files. At one point I got this error on the Status Reports page:

Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Content

    The node.<my_field> needs to be uninstalled.

When I run the proposed command

drush upe node

I get

Error: Class 'Drupal\entity_update\Commands\EntityUpdate' not found in /var/www/html/web/modules/contrib/entity_update/src/Commands/EntityUpdatesCommands.php on line 194 #0 [internal function]: Drupal\entity_update\Commands\EntityUpdatesCommands->entityUpdates('node', Array)
#1 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#2 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#3 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#4 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(313): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#5 /var/www/html/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#12 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#13 {main}
Error: Class &#039;Drupal\entity_update\Commands\EntityUpdate&#039; not found in Drupal\entity_update\Commands\EntityUpdatesCommands->entityUpdates() (line 194 of /var/www/html/web/modules/contrib/entity_update/src/Commands/EntityUpdatesCommands.php).
 [warning] Drush command terminated abnormally.
Failed to run drush upe node: exit status 1

Steps to reproduce

  1. Mess around with install configuration until you get the "field needs to be uninstalled" error.
  2. Install Entity Update 2.0.x-dev
  3. Run drush upe node

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇰Denmark benjamin_dk

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.

Production build 0.71.5 2024