Problem/Motivation
The following code in \Drupal\content_lock\ContentLock\ContentLock::locking
// There is a stale lock. Release it.
if (is_object($lock) && $lock->uid != $uid) {
$this->release($entity, $form_op, $uid);
}
// Save locking into database.
$this->lockingSave($entity, $form_op, $uid);
does not work because passing $uid is not right - it should be $lock->uid
Steps to reproduce
Take over a stale lock and see that the lock is not released correctly. The later merge in \Drupal\content_lock\ContentLock\ContentLock::lockingSave() overwrites the lock.
Proposed resolution
Pass the correct UID in and test it.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork content_lock-3598231
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 #3
alexpottComment #5
alexpott