Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
plugin system
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2019 at 15:00 UTC
Updated:
1 Apr 2025 at 08:09 UTC
Jump to comment: Most recent
Comments
Comment #2
mpastas commentedHi guys, I'm upgrading an installation from 8.5.8 to 8.6.15 and I'm having the same issue in drupal 8.6.15. In the customer installation, the *Actions* Module (optional) was disabled. I enabled it and still having the same issue:
The error is thrown when executing the following portion of code when
$action->getPlugin()->getPluginId()is called.Comment #3
chi commentedThe work around is manually export the actions (system.action.*.yml files) from fresh Drupal 8 installation and then import them to existing site.
Comment #4
basvredelingGreat tip from: #3
Comment #7
pasqualleSometimes configuration changes for Drupal core are missing update hooks. Or maybe the update hook can't fully install the configuration changes due to a required module is disabled.
Suggestion: Use Configuration Update Manager module, and make sure the "Missing configuration items" section is always empty in the report. Many configuration related issues can be solved this way.
Comment #9
loopy1492 commentedI just upgraded from d8 to d9 and this is one of the blockers I was trying to get past. Upon config import, the following error was thrown:
I do have the entity_status module enabled and while there was a node update early in the process, all of that config had long been exported and committed.
At any rate, I went hunting for node_delete_action in my files and found it in my site's config and also the core node module's config folder. I noticed that the big difference was the plugin:
plugin: node_delete_actionvs.
plugin: entity:delete_action:nodeSo I copied the new plugin info into my config and the import ran smoothly.
Comment #10
loopy1492 commentedThis is really really strange. Although my configuration now passes BLT build in pipelines, when I try to run CIM on the server, it fails with the same error.
What gives? Is it possible that updb and entity:updates isn't capturing a node update somwhere?
Here's my system.action.node_delete_action.yml config:
And here's the full response from cim -y:
Comment #11
loopy1492 commentedI deleted the config from my default folder entirely and now the code passes pipelines and I can cim on the server.
I am still able to delete nodes, so I guess everything is fine?
I guess?
Comment #12
marco.aresu commentedI have the same error if upgrade Drupal from 8.9 to 9.2.
The problem occurs in delete bulk operations.
To solve the problem:
Comment #13
roy84 commentedSame problem when updating from 8.9 to 9.2.
The update and drush cim went fine in my project, but the error was thrown at /admin/people
#12 solved the problem.
Comment #14
stephenplatz commentedThis issue seems to still be affecting 9.2.2
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "node_delete_action" plugin does not exist. Valid plugin IDs for Drupal\Core\Action\ActionManager are: comment_unpublish_by_keyword_action, commerce_publish_product, commerce_unpublish_product, entity_delete_action:comment, entity_delete_action:commerce_order, entity_delete_action:commerce_product, entity_delete_action:commerce_promotion, entity_delete_action:commerce_store, entity_print_download_action, node_make_sticky_action, node_unpublish_by_keyword_action, node_unpromote_action, node_make_unsticky_action, node_assign_owner_action, node_promote_action, redirect_delete_action, user_unblock_user_action, user_remove_role_action, user_add_role_action, user_block_user_action, user_cancel_user_action, webform_submission_make_sticky_action, webform_submission_make_unlock_action, webform_submission_make_lock_action, webform_submission_delete_action, webform_submission_make_unsticky_action, pathauto_update_alias, entity:save_action:block_content, entity:save_action:comment, entity:save_action:commerce_order, entity:save_action:commerce_order_item, entity:save_action:commerce_payment_method, entity:save_action:commerce_product_variation, entity:save_action:commerce_product_attribute_value, entity:save_action:commerce_product, entity:save_action:commerce_promotion, entity:save_action:commerce_promotion_coupon, entity:save_action:entity_subqueue, entity:save_action:file, entity:save_action:media, entity:save_action:node, entity:save_action:profile, entity:save_action:taxonomy_term, entity:save_action:user, entity:save_action:menu_link_content, action_goto_action, entity:delete_action:comment, entity:delete_action:commerce_order, entity:delete_action:commerce_product, entity:delete_action:commerce_promotion, entity:delete_action:commerce_store, entity:delete_action:media, entity:delete_action:node, entity:delete_action:profile, entity:publish_action:block_content, entity:publish_action:comment, entity:publish_action:commerce_product_variation, entity:publish_action:commerce_product, entity:publish_action:entity_subqueue, entity:publish_action:media, entity:publish_action:node, entity:publish_action:path_alias, entity:publish_action:profile, entity:publish_action:taxonomy_term, entity:publish_action:menu_link_content, entity:publish_action:paragraph, entity:unpublish_action:block_content, entity:unpublish_action:comment, entity:unpublish_action:commerce_product_variation, entity:unpublish_action:commerce_product, entity:unpublish_action:entity_subqueue, entity:unpublish_action:media, entity:unpublish_action:node, entity:unpublish_action:path_alias, entity:unpublish_action:profile, entity:unpublish_action:taxonomy_term, entity:unpublish_action:menu_link_content, entity:unpublish_action:paragraph, action_send_email_action, action_message_action in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /app/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).Comment #15
loopy1492 commentedAnd now I'm getting this on my /admin/people page in production.
> Drupal\Component\Plugin\Exception\PluginNotFoundException: The "comment_delete_action" plugin does not exist. Valid plugin IDs for Drupal\Core\Action\ActionManager are: comment_unpublish_by_keyword_action, feeds_feed_delete_action, node_assign_owner_action, node_unpromote_action, node_promote_action, node_make_sticky_action, node_unpublish_by_keyword_action, node_make_unsticky_action, pathauto_update_alias, redirect_delete_action, user_add_role_action, user_block_user_action, user_cancel_user_action, user_remove_role_action, user_unblock_user_action, entity:edit_action:block_content, entity:edit_action:comment, entity:edit_action:content_moderation_state, entity:edit_action:feeds_feed, entity:edit_action:feeds_subscription, entity:edit_action:file, entity:edit_action:media, entity:edit_action:node, entity:edit_action:paragraph, entity:edit_action:path_alias, entity:edit_action:redirect, entity:edit_action:search_api_task, entity:edit_action:shortcut, entity:edit_action:taxonomy_term, entity:edit_action:user, entity:edit_action:webform_submission, entity:edit_action:menu_link_content, views_bulk_edit, vbo_cancel_user_action, views_bulk_operations_delete_entity, webform_archive_action, webform_close_action, webform_delete_action, webform_open_action, webform_unarchive_action, webform_submission_delete_action, webform_submission_make_lock_action, webform_submission_make_sticky_action, webform_submission_make_unlock_action, webform_submission_make_unsticky_action, entity:delete_action:comment, entity:delete_action:media, entity:delete_action:node, entity:delete_action:webform, action_send_email_action, action_goto_action, action_message_action, entity:publish_action:block_content, entity:publish_action:comment, entity:publish_action:media, entity:publish_action:node, entity:publish_action:paragraph, entity:publish_action:path_alias, entity:publish_action:taxonomy_term, entity:publish_action:menu_link_content, entity:save_action:block_content, entity:save_action:comment, entity:save_action:feeds_feed, entity:save_action:file, entity:save_action:media, entity:save_action:node, entity:save_action:taxonomy_term, entity:save_action:user, entity:save_action:menu_link_content, entity:unpublish_action:block_content, entity:unpublish_action:comment, entity:unpublish_action:media, entity:unpublish_action:node, entity:unpublish_action:paragraph, entity:unpublish_action:path_alias, entity:unpublish_action:taxonomy_term, entity:unpublish_action:menu_link_content in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /var/www/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Why does this keep happening. Can't core clean itself up?
"Just create and commit a custom module to fix it" seems to be a strange option here.
Comment #16
loopy1492 commentedI have created the module and after installing it and running cr and updb, it still hasn't fixed the /people page. Here is my code on actions_fixer.install. What am I doing wrong?
Comment #17
loopy1492 commentedAdding it to the install function seems to have worked. Obviously there was something not right with the update hook function.
Note that, after running the module, you'll want to export the config. There will be changes to the system.action.comment_delete_action and system.action.node_delete_action. Also note that you can't get away with just committing these config files and importing them. It seems to me, after my testing, that the module needs to actually run.
I'm not sure why, during our testing, that we were able to delete nodes if this action was messed up. You would think it would have errrored out when we were trying to delete nodes. Also, why is this only happening on the admin/people page?
Well, at any rate, this seems to be working so far. Drupal's gonna Drupal.
Comment #18
mlncn commentedRunning into this same issue. First time after a dozen other sites upgraded fine. So it's not all Drupal sites running into this as "node_delete_action" is replaced with "entity:delete_action:node" etc but somewhere along the line it can get messed up and core should probably be catching this, the underlying cause should be identified, and this issue should have a more 'official' fix even if core cannot clean itself up on this. Can a Drupal maintainer re-open this?
Comment #19
mlncn commentedConfiguration Update Manager can identify that source has
plugin : 'entity:delete_action:node'while site config hasplugin : node_delete_action, but it cannot fix it, because it gets the same 'The "node_delete_action" plugin does not exist' error, naturally.So we need to do marco.aresu's fix in #12 but i'd love to know why!
Comment #20
mlncn commentedA bunch of similar issues with mostly non-core plugins and Drupal 7 to 9 migrations are getting collected at #3056633: It is not possible to uninstall a module that provides a filter plugin via config import
Comment #21
mlncn commentedAnd work toward core handling the error itself more gracefully is in #3095427: Handle missing action plugin during migration gracefully
I still think the frequency/possibility/impact of
node_publish_actionnot getting updated toentity:publish_action:node,node_save_actionnot getting updated toentity:save_action:node, etc. is still worth more fixing/visibility.This is a site we were not managing, so my best guess is someone ignored some update failures somewhere along the line and ultimately it had to be dealt with by this custom update hook, we needed all this:
This update hook is safe for everyone; if any of these don't apply they just get ignored.
Comment #22
adambernstein commentedThanks @mlncn! The update hook in #21 works well.
Comment #23
nicxvan commentedThe update in 21 worked for me as well!
Comment #24
emil stoianov commentedUnfortunately the update above is not working as expected.
The list of actions in bulk operations is reduced and does not cover the above renamed ones.
Comment #25
vlad.dancerThanks a lot @mlncn! #21 works for me too.
Comment #26
gaurav.kapoor commentedThanks for the snippet in #21, resolved the issue for me.
Comment #27
dydave commentedHi everyone,
Thank you very much for raising this issue and your code contributions.
I would like to gladly confirm the update hook from #21 helped fixing the issue in our case, with Drupal 9.2.10.
We added the code from #21 in a custom module and ran db updates, which seemed to fix the problem.
You might want to re-export the modified config afterwards, in particular the updated actions,
system.action.*.ymlfiles.Special thanks to @mlncn for providing a very clear explanation of the issue and an out-of-the-box solution.
Thanks in advance for your feedback and comments.
Comment #28
suparnaa.dey commentedAdded the code from #21 in a custom module and ran drush updb and works ..
Comment #29
loopy1492 commented#21 fixed it for me as well. Thank you so much @mlncn
Comment #30
vacho commentedComment #31
solimanharkas commentedThe update in #21 worked for me as well. Many thanks
Comment #32
piotr pakulskiThe update in #21 worked for me as well. Thank you
Comment #33
rob230 commentedThis is still a major bug with Drupal core. In fact, I think the config import code itself is broken.
In our yml we have the correct plugin "entity:delete_action:node", but when running
drush cimit says:The problem is that in the active configuration it still has the old plugin:
drush config:get system.action.node_delete_actionThis is part of a wider issue whereby
drush cimis unable to import if the active config has an issue, even if the config being imported has that config removed. For example, I have experienced numerous problems with it saying config that depends on a module won't exist after import - but the module will be uninstalled by the import, the issue is the order that it imports stuff in. If there is config that depends on a module that occurs alphabetically before core.extension.yml then it will refuse to import, even though there is nothing wrong with the config being imported.I have noticed that
drush csimfrom the config_split module does not have this problem.This is making deployments very difficult. I'm having to run dozens of drush commands to uninstall modules and delete pieces of config, otherwise
drush cimwill fail. There is nothing wrong with the config being imported, it's just a dependency issue where the config import is not able to realise that the dependencies it finds in the active config don't exist in the config being imported.I don't know if I should spin off another bug for this wider config import issue. What's happening with system.action.* is config import sees an invalid plugin in the active config, so it refuses to import at all, even though the config being imported has the correct plugin in it. What should happen is config import looks at all of the config being imported when working out dependencies and valid plugin names etc.
Comment #34
pawel_r commentedUpdate from #21 works fine unless custom or contribute module is assuming action id and plugin are the same.
See example problem for Role Delegation issue: 3116188
Comment #35
pranavpathak commented#21 Helped me too.
thanks for that.
Comment #36
dshumaker commented-
Comment #37
tmendesilva commented#21 works for me too
Comment #38
m3lgy commented#21 works for me on Drupal 10.4. Added it to the .module file in a custom module.
Comment #39
soryuk commented@m3lgy in which hook did you place this code ? thanks