diff --git a/modules/content_lock_timeout/content_lock_timeout.module b/modules/content_lock_timeout/content_lock_timeout.module index 14e7d2d..3933222 100644 --- a/modules/content_lock_timeout/content_lock_timeout.module +++ b/modules/content_lock_timeout/content_lock_timeout.module @@ -70,7 +70,7 @@ function content_lock_timeout_entity_prepare_form(EntityInterface $entity, $oper // A different user owns the lock. // There is already a lock on this entity. if (!empty($entity->id()) - && is_object($lock = $lock_service->fetchLock($entity->id(), $entity->getEntityTypeId(), $operation, $entity->getEntityTypeId())) + && is_object($lock = $lock_service->fetchLock($entity->id(), $entity->language()->getId(), $operation, $entity->getEntityTypeId())) && $lock->uid != $user->id() && $lock->timestamp < $last_valid_time // Now check a subset of the conditions that content_lock_form_alter() @@ -115,7 +115,7 @@ function content_lock_timeout_user_logout($account) { // Only do the database check if the original drupal session manager is used. // Otherwise its not sure if sessions table has correct data. As it would be - // a common practice to extend the Class, instanceof is not used here! + // possible to extend the Class, instanceof is not used here! if (get_class(Drupal::service('session_manager')) == SessionManager::class) { $query = \Drupal::database() ->select('sessions');