0

We have recently updated a Drupal 8.4.6 installation via composer to Drupal 8.5.1. After the composer update I ran

drush updb

as usual. However, the command fails at one point with the following error message:

Failed: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "media_delete_action" plugin does not     [error]
exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 52 of
…\htdocs\casali\web\core\lib\Drupal\Component\Plugin\Discovery\DiscoveryTrait.php).

After that, every drush updb wants to do the following updates, since they are never completed:

system module :
  Change plugin IDs of actions.
  Clear caches due to schema changes in core.entity.schema.yml.

views module :
  Update dependencies for moved bulk field plugin.
  Add additional settings to the entity link field and convert node_path usage  to entity_link.
  Add placeholder settings to string or numeric filters.
  Fix cache max age for table displays.
  Include views data table provider in views dependencies.

I am not quite sure what to do here. As far as I have researched, media_delete_action is part of the media_entity module. However, that module is already part of the core in Drupal 8.4.x (https://www.drupal.org/project/media_entity).

If I run

drush en media_entity

it tells me

media_entity was not found.                                                                                                [warning]
The following projects provide some or all of the extensions not found:                                                    [ok]
media_entity
Would you like to download them? (y/n):

But I don't think I should have to do that, since it's already part of the core?

  • I don't think its called media_entity anymore – Kevin Apr 5 '18 at 15:46
  • True, it's only called media. But that module is already enabled anyway. – fritzmg Apr 5 '18 at 15:59
  • Did you follow the upgrade path mentioned on the project page? – 4k4 Apr 5 '18 at 16:29
  • The upgrade path is only applicable for projects that have been started prior to Drupal 8.4. I am not upgrading from media_entity to media. The installation always only was on Drupal 8.4 and it always only used media. – fritzmg Apr 5 '18 at 16:54
  • I've asked because media_entity_actions is part of the upgraded media in 8.4 which includes the missing plugin cgit.drupalcode.org/media_entity_actions/tree/src/Plugin/Action/… – 4k4 Apr 5 '18 at 17:31
2

This is how we were able to solve this problem:

Temporarily install drupal/media_entity_actions:

composer require drupal/media_entity_actions:^1.0
drush en media_entity_actions

Run the database update:

drush updb

This time it will work:

system module :
  Change plugin IDs of actions.
  Clear caches due to schema changes in core.entity.schema.yml.

views module :
  Update dependencies for moved bulk field plugin.
  Add additional settings to the entity link field and convert node_path usage  to entity_link.
  Add placeholder settings to string or numeric filters.
  Fix cache max age for table displays.
  Include views data table provider in views dependencies.

Do you wish to run all pending updates? (y/n): y
Post updating system                                                                                                       [ok]
Post updating system                                                                                                       [ok]
Post updating views                                                                                                        [ok]
Post updating views                                                                                                        [ok]
Post updating views                                                                                                        [ok]
Post updating views                                                                                                        [ok]
Post updating views                                                                                                        [ok]
Post updating views                                                                                                        [ok]
Post updating views                                                                                                        [ok]
Cache rebuild complete.                                                                                                    [ok]
Finished performing updates.                                                                                               [ok]

Then the module can be uninstalled safely:

drush pm-uninstall media_entity_actions
composer remove drupal/media_entity_actions

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.