diff --git a/packages/drupal/silverback_autosave/src/Storage/AutosaveEntityFormDatabaseStorage.php b/packages/drupal/silverback_autosave/src/Storage/AutosaveEntityFormDatabaseStorage.php index 574d0934e..21dae10ad 100644 --- a/packages/drupal/silverback_autosave/src/Storage/AutosaveEntityFormDatabaseStorage.php +++ b/packages/drupal/silverback_autosave/src/Storage/AutosaveEntityFormDatabaseStorage.php @@ -58,7 +58,7 @@ public function storeEntityAndFormState($form_id, $form_session_id, $entity_type // e.g. when user is navigating away from the page. // Also, this approach ensures that there will be always // a stored form state in the db, in case we need to restore. - $this->purgeAutosavedEntityState($entity_type_id, $entity_id, NULL, $form_id, $langcode, $uid); + // $this->purgeAutosavedEntityState($entity_type_id, $entity_id, NULL, $form_id, $langcode, $uid); // Now, enter the new values. $this->connection->insert(static::AUTOSAVE_ENTITY_FORM_TABLE) ->fields([ @@ -169,9 +169,10 @@ public function getFormState($form_id, $entity_type_id, $entity_id, $langcode, $ ->orderBy('timestamp', 'DESC') ->condition('form_id', $form_id); - if (isset($form_session_id)) { - $query->condition('form_session_id', $form_session_id); - } + // Use this for future restore state. + /* if (isset($form_session_id)) { + $query->condition('form_session_id', $form_session_id); + } */ $query->condition('entity_type_id', $entity_type_id) ->condition('entity_id', $entity_id)