Skip to content

Commit

Permalink
[BUGFIX] Do not cache DS unless marked static
Browse files Browse the repository at this point in the history
Prevents issues where “old” record values would be used
on a second request after saving the form.

Close: #1611
  • Loading branch information
NamelessCoder committed Oct 19, 2018
1 parent 36e89e7 commit 3f4d486
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Classes/Integration/HookSubscribers/DynamicFlexForm.php
Expand Up @@ -174,8 +174,7 @@ public function parseDataStructureByIdentifierPreProcess(array $identifier)
DataStructureProviderInterface::class
);
if (count($providers) === 0) {
// No Providers detected - we will cache this response
$this->configurationService->setInCaches([], true, $identifier);
// No Providers detected - return empty data structure (reported as invalid DS in backend)
return [];
}
foreach ($providers as $provider) {
Expand All @@ -193,7 +192,6 @@ public function parseDataStructureByIdentifierPreProcess(array $identifier)
}

$dataStructArray = $this->patchTceformsWrapper($dataStructArray);
$this->configurationService->setInCaches($dataStructArray, false, $identifier);

return $dataStructArray;
}
Expand Down

0 comments on commit 3f4d486

Please sign in to comment.