Draft: #3502902 pull logic from ApiAutoSaveController to update entity from auto-save data
6 unresolved threads
Compare changes
Conflict: This file was modified in both the source and target branches.
Ask someone with write access to resolve it.
+ 79
− 1
@@ -3,9 +3,16 @@
@@ -17,6 +24,7 @@ class AutoSaveManager {
@@ -28,8 +36,15 @@ class AutoSaveManager {
@@ -40,6 +55,7 @@ class AutoSaveManager {
@@ -96,4 +112,66 @@ class AutoSaveManager {
probably way too basic
Edited by Ted Bowman
- Comment on lines +142 to +144
In the original version of the code in
ApiAutoSaveController::post()
it updated the entities and validated them. Here I tried to remove the validate logic and leave it inApiAutoSaveController::post()
, but\Drupal\experience_builder\ClientDataToEntityConverter::convert
has built-in logic for validation so I added the argument which would be true when called fromApiAutoSaveController::post()
Edited by Ted Bowman
We may have had an previous state in auto-save that didn't match the saved entity. but if the client now matches we should delete auto-saved version.
This would happen if say code component briefly changed the JS to something other the saved version but then reverted that change. there would be no longer a need for an auto-saved state and it should not show up in lists.