You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When resourceLockObserverUnlock() is called in src/Resources/Pages/Concerns/UsesResourceLock.php by clicking the button to "Unlock page" the record isn't locked by the user that clicked the button.
I noticed that save() has a call to $this->record->refresh(). I tried adding this to resourceLockObserverUnlock() before attempting to lock the record and it appears to work:
public function resourceLockObserverUnlock()
{
if ($this->record->unlock(force: true)) {
$this->closeLockedResourceModal();
// refresh the record before attempting to re-lock
$this->record->refresh();
$this->record->lock();
}
}
Should the record be refreshed prior to attempting to gain a new lock?
Thanks for this great plugin!
The text was updated successfully, but these errors were encountered:
When resourceLockObserverUnlock() is called in src/Resources/Pages/Concerns/UsesResourceLock.php by clicking the button to "Unlock page" the record isn't locked by the user that clicked the button.
I noticed that save() has a call to $this->record->refresh(). I tried adding this to resourceLockObserverUnlock() before attempting to lock the record and it appears to work:
Should the record be refreshed prior to attempting to gain a new lock?
Thanks for this great plugin!
The text was updated successfully, but these errors were encountered: