Handle missing action plugin during migration gracefully

Created on 19 November 2019, over 5 years ago
Updated 23 May 2025, 16 days ago

Problem/Motivation

Report using 8.8.0-beta1.

The d6_action and d7_action migrations cause fatal errors preventing an automated migration from working. Since action usually runs first this causes a confusing error and the best work around is to remove and not run the migration at all. This is the second, completely different site I encountered this on so I decided to write it up as an issue. It could probably be very frustrating.

This might be an issue with action derivatives and migrations.

If I don't want to install a module on Drupal 8 or Drupal 9 because it was not necessary, then I should not have to install that module to migrate my Drupal 6 or Drupal 7 web site. For instance if I no longer need "comment" module, then I should not get an error like this:

 [error]  The "entity:publish_action:comment" plugin does not exist. Valid plugin IDs for Drupal\Core\Action\ActionManager are: node_assign_owner_action, node_delete_action, node_unpromote_action, node_promote_action, node_publish_action, node_save_action, node_make_sticky_action, node_unpublish_by_keyword_action, node_unpublish_action, node_make_unsticky_action, user_add_role_action, user_block_user_action, user_cancel_user_action, user_remove_role_action, user_unblock_user_action, action_send_email_action, action_goto_action, action_message_action, entity:publish_action:block_content, entity:publish_action:node, entity:publish_action:path_alias, entity:publish_action:taxonomy_term, entity:publish_action:menu_link_content, entity:save_action:block_content, entity:save_action:file, entity:save_action:node, entity:save_action:profile, entity:save_action:taxonomy_term, entity:save_action:user, entity:save_action:menu_link_content, entity:unpublish_action:block_content, entity:unpublish_action:node, entity:unpublish_action:path_alias, entity:unpublish_action:profile, entity:unpublish_action:taxonomy_term, entity:unpublish_action:menu_link_content (core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php:53) 

Proposed resolution

  1. Add a "module_exists" process plugin to check whether a module exists by name.
  2. Adjusts d6 and d7 action migration templates to skip row when the module doesn't exist.

Remaining tasks

- Review

User interface changes

N/A

API changes

Adds a ModuleExists process plugin for all to use and enjoy.

Data model changes

N/A

Release notes snippet

πŸ› Bug report
Status

Postponed

Version

11.0 πŸ”₯

Component

migration system

Created by

πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

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