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
Comments
Comment #3
alexpottComment #5
alexpott