Skip to content

Commit 6984b17

Browse files
authored
IBX-10420: Reloaded content as it is out of date after going through action dispatcher (#100)
1 parent 7909c14 commit 6984b17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/Content/View/Builder/ContentEditViewBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function buildView(array $parameters)
100100

101101
foreach ($validationErrors as $fieldIdentifier => $validationErrorLanguages) {
102102
$fieldValueElement = $form->get('fieldsData')->get($fieldIdentifier)->get('value');
103-
foreach ($validationErrorLanguages as $languageCode => $validationErrors) {
103+
foreach ($validationErrorLanguages as $validationErrors) {
104104
if (is_array($validationErrors) === false) {
105105
$validationErrors = [$validationErrors];
106106
}
@@ -113,6 +113,8 @@ public function buildView(array $parameters)
113113
}
114114
}
115115

116+
// Reload content in case it was modified by the form handler.
117+
$content = $this->resolveContent($parameters, $location, $language);
116118
$view->setContent($content);
117119
$view->setLanguage($language);
118120
$view->setLocation($location);

0 commit comments

Comments
 (0)