Open
Conversation
[ci skip]
# Conflicts: # src/templates/_elements/cardsview/elements.twig # src/templates/_elements/tableview/elements.twig # src/templates/_elements/thumbsview/elements.twig # src/web/assets/cp/dist/cp.js # src/web/assets/cp/dist/cp.js.map
i-just
requested changes
Apr 17, 2026
Contributor
There was a problem hiding this comment.
This looks great!
I only found one proper bug, and the rest are questions/suggestions:
- it's not possible to delete assets via element index action on this branch (using local FS)
- when the deletion modal is presented, could we make the whole “accordion” title clickable (to expand), not just the icon?
- is it intended behaviour that you can’t use double-click to open, e.g. entries in the element index in the deletion modal? (the pencil icon works as expected)
- lets say you have a setup where some entries were authored by the user you want to delete; is there a reason why the “delete entries” action takes immediate effect, and reassign/remove author ones don’t?
- if it needs to stay like this, could we tweak the confirmation message to say that this will take immediate effect? (I know most people rarely read those messages at all/in full, but it might be beneficial if/when they do)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the ability for elements to define blockers that should prevent their own deletion.
When the element is deleted via a supporting UI control, the element will be checked for blockers, and if there are any, a modal will be shown to the user that lists them, along with various options to resolve them.
Elements can define their own deletion blockers via the new
ElementInterface::deletionBlockers()method, and plugins can register additional blockers via a newElement::EVENT_DEFINE_DELETION_BLOCKERSevent.See
ElementInterface::deletionBlockers()for documentation on blocker/action definitions, andcraft\elements\User::deletionBlockers()for a usage example.Related issues