Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
Content lock doesn't work when opening an entity for editing in an inline entity form.
There was a Drupal 7 version of this feature request. I'm creating a separate issue for the Drupal 8 version of content_lock.
Comment | File | Size | Author |
---|---|---|---|
#18 | content_lock-n2973048-18.interdiff.txt | 2.24 KB | DamienMcKenna |
#18 | content_lock-n2973048-18.patch | 6.8 KB | DamienMcKenna |
|
Comments
Comment #2
oknateComment #3
DamienMcKennaComment #4
DamienMcKennaComment #5
DamienMcKennaWorking through the implementation details, or at least one possible approach:
Comment #6
DamienMcKennaWIP, lock entities when they're first loaded by IEF; this will require more work, but it should at least do the initial lock.
Comment #7
DamienMcKennaComment #8
DamienMcKennaAlternative patch that can be used with other patches.
Note: this was based on a codebase which had the following patches applied: #2919019-3: content_lock_entity_operation doesn't work if the entity list is cached, #2949198-9: Lock form should indicate if entity no longer locked., #2949202-2]
Comment #9
DamienMcKennaStill to do:
Comment #10
DamienMcKennaAnd now we have recursive unlocking of nested entities.
Comment #11
DamienMcKennaIt might be worth considering the nested entity unlocking a separate thing, I'd be happy to spin it off into another issue if desired.
Comment #13
DamienMcKennaDoh. A small typoo because I no longer live in a git-powered world and have to copy/paste changes to a real git checkout :-\
Comment #14
DamienMcKennaNote: this doesn't cover items locked which are referenced via Entity Embed, I'll be posting that somewhere else as it doesn't really belong here.
Comment #15
DamienMcKennaThe break-lock button doesn't work well:
I think the unlock button needs to be changed entirely to work within IEF's architecture so that it works inline, i.e. via AJAX.
Comment #16
DamienMcKennaProblems so far:
Comment #17
DamienMcKennaThis makes two changes:
This is a temporary workaround, I'm hoping I'll get to work on the proper fixes some more soon.
Comment #18
DamienMcKennaSome protection against accidentally looping over the entire site =)
Comment #19
DamienMcKennaNeeds work, per #16.