Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Motivations
For now, it's impossible from a operations bulk form (E.g. visible in the Content views) to "Break locks" of all selected entity.
Resolution
Add a new system.action "Bulk Break Locks" & a new Plugin/Action to break all selected locks.
Here is a documentation about this process: https://www.flocondetoile.fr/blog/create-action-custom-mass-updates-drup...
It could then looks like this animated gif:
Comment | File | Size | Author |
---|---|---|---|
#7 | interdiff-2938600-5-9.txt | 6.64 KB | chr.fritsch |
#7 | 2938600-9.patch | 8.31 KB | chr.fritsch |
#5 | 2938600-5.patch | 3.55 KB | chr.fritsch |
#2 | add-new-bulk-operation-action-2938600-2.patch | 3.26 KB | Jaber ME |
content-lock-bulk-operation.gif | 191.36 KB | wengerk |
Comments
Comment #2
Jaber ME CreditAttribution: Jaber ME as a volunteer and commentedSolution :
Comment #3
Jaber ME CreditAttribution: Jaber ME as a volunteer and commentedComment #4
chr.fritschThank you, it's a very nice feature request.
When we do this, we should try to provide this action for every entity type that is using content lock.
I will try to cook something up.
Comment #5
chr.fritschHere it's implementation with a deriver.
I would like to here @kfritsche feedback on this, especially on the release part.
Comment #7
chr.fritschLets give this another push.
Comment #9
chr.fritschTests are passing. I think this is good to go.
Comment #10
kfritscheWas reviewing it while it got committed :/
But still
Missing entity type id.
Same issue as described in #2938092: Ajax lock not created due to strict permission checks, but would be fine for now.
Not sure about this. Would it make sense to check configs here, if type is lockable?
General note regarding caching. I'm unsure about this, but maybe just to think about it. Are Actions cached? Views are cached could this run into problems?
Comment #11
kfritscheComment #12
chr.fritschThanks for reviewing. I try to be more patient next time 😆
1. Nice find
3. I think thats fine. That doesn't mean that there are actions. That just means that these entity types could possibly used for the action.
The general problem is, that the view is most of the times cached. So the view says the entity is still locked, but it isn't. We have this problem with the "Break lock" operation as well. So thats not a problem of actions.
Comment #14
chr.fritschFixed 1.