Problem/Motivation
After updating our site from 3.0.0 to 3.0.1, going to /admin/people results in the following error:
The website encountered an unexpected error. Try again later.<br><br><em class="placeholder">Drupal\Component\Plugin\Exception\PluginNotFoundException</em>: The "immediate_delete" plugin does not exist. Valid plugin IDs for Drupal\Core\Action\ActionManager are: file_delete_immediately, file_delete_mark_temporary, node_unpromote_action, node_promote_action, node_make_sticky_action, node_make_unsticky_action, redirect_delete_action, user_add_role_action, user_block_user_action, user_cancel_user_action, user_remove_role_action, user_unblock_user_action, vbo_cancel_user_action, views_bulk_operations_delete_entity, webform_submission_make_unlock_action, webform_submission_make_unsticky_action, webform_submission_delete_action, webform_close_action, webform_open_action, webform_submission_make_lock_action, webform_archive_action, webform_unarchive_action, webform_submission_make_sticky_action, webform_delete_action, state_change:block_content__approved_to_go_live, state_change:block_content__draft, state_change:block_content__needs_approval, state_change:block_content__published, state_change:block_content__unpublished, state_change:media__approved_to_go_live, state_change:media__draft, state_change:media__needs_approval, state_change:media__published, state_change:media__unpublished, state_change:node__approved_to_go_live, state_change:node__draft, state_change:node__needs_approval, state_change:node__published, state_change:node__unpublished, state_change:paragraph__approved_to_go_live, state_change:paragraph__draft, state_change:paragraph__needs_approval, state_change:paragraph__published, state_change:paragraph__unpublished, state_change:taxonomy_term__approved_to_go_live, state_change:taxonomy_term__draft, state_change:taxonomy_term__needs_approval, state_change:taxonomy_term__published, state_change:taxonomy_term__unpublished, pathauto_update_alias, 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:media, entity:publish_action:node, entity:publish_action:paragraph, entity:publish_action:path_alias, entity:publish_action:redirect, entity:publish_action:taxonomy_term, entity:publish_action:menu_link_content, entity:save_action:block_content, entity:save_action:file, entity:save_action:link_to_subject_and_geo, entity:save_action:media, entity:save_action:node, entity:save_action:role_watchdog, entity:save_action:taxonomy_term, entity:save_action:user, entity:save_action:menu_link_content, entity:unpublish_action:block_content, entity:unpublish_action:media, entity:unpublish_action:node, entity:unpublish_action:paragraph, entity:unpublish_action:path_alias, entity:unpublish_action:redirect, entity:unpublish_action:taxonomy_term, entity:unpublish_action:menu_link_content in <em class="placeholder">Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition()</em> (line <em class="placeholder">53</em> of <em class="placeholder">core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php</em>).
Steps to reproduce
Update from 3.0.0 to 3.0.1
Run drush updb
Login as an admin
Go to /admin/people
Proposed resolution
The update hook file_delete_update_400004() ran but after debugging it I can see that it didn't make any changes. The following config is trying to be loaded but does not exist:
action.system.action.mark_file_for_deletion
action.system.action.immediate_delete
The config in this site is named:
system.action.mark_file_for_deletion
system.action.immediate_delete
(it doesnt start with action.)
Remaining tasks
Decide how to fix this and then create another update hook that fixes it.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3567720.patch | 4.76 KB | dioni |
Issue fork file_delete-3567720
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
svicer commentedConfirmed. There's a second bug in the same hook:
action.system.action.*→ should besystem.action.*idbut should updatepluginSilent failure because
getEditable()with non-existent config returns empty object,$config->get('id')returns NULL, condition is false.Comment #4
nicrodgersHi @svicer thanks for looking at this. I have tested your MR and confirm that it does fix the problem when updating from 3.0.0 to 3.0.1.
However I think we'll need to increase the update hook number to file_delete_update_400005 because some people may have already run file_delete_update_400004 after updating to 3.0.1.
If we can get this RTBC hopefully we can then get a 3.0.2 releaes out ASAP. Bumping the priority to Critical due to the upgrade from 3.0.0 to 3.0.1 being broken.
Comment #6
robert-arias commentedBumped the update hook sequence and removed the faulty update hook. Not sure if you wanted to keep it just for record sake!
Comment #7
nicrodgersThanks Robert. I think we should keep file_delete_update_400004() but remove the code from within it, and add/update a comment explaining that it's been removed as it was faulty and replaced with 400005.
Comment #9
nnevillI've updated the MR, but it's important not to run
drush deploybut rundrush updb & drush cex -ybeforeComment #10
nicrodgersThank @nnevil.
I've made a tiny change to the comment in the update hook to shorten it, so that phpcs is happy.
I'll leave it as Needs Review for someone else to approve.
Comment #11
alexander tallqvist commentedThanks for the MR!
I tested
MR21onfile_deletemodule version3.0.1with Drupal11.2.10and can confirm that visiting/admin/peopleno longer produces a fatal error.After installing the patch, running database updates and exporting the configuration correctly updates:
system.action.immediate_delete.ymlsystem.action.mark_file_for_deletion.ymlSetting to RTBTC!
Comment #12
dioni commentedTested and working as expected.
Adding the MR as patch file.
Comment #14
smustgrave commentedDon't think we should remove an old hook, so I put that back. Moving to NR for a quick check and can merge.
Comment #16
smustgrave commentedActually nvm