Commit 0cb761cb authored by Oliver Hader's avatar Oliver Hader Committed by Oliver Hader
Browse files

[BUGFIX] Initialize inline form fields just once

Due to a bug, inline form fields were initialized twice, causing
internal application state issues in FormEngine and Modal handling.

Resolves: #96009
Releases: master
Change-Id: I07f75ae90826eec77515ec84e69f4154828295a1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72214


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Chris Müller's avatarChris Müller <typo3@krue.ml>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
parent 8af0f415
......@@ -90,7 +90,7 @@ abstract class AbstractFormEngineAjaxController
protected function addRegisteredRequireJsModulesToJavaScriptItems(array $result, JavaScriptItems $items): void
{
foreach ($result['requireJsModules'] as $module) {
foreach ($result['requireJsModules'] ?? [] as $module) {
if ($module instanceof JavaScriptModuleInstruction) {
$items->addJavaScriptModuleInstruction($module);
}
......
......@@ -29,7 +29,6 @@ use TYPO3\CMS\Core\Http\JsonResponse;
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Core\Messaging\FlashMessageService;
use TYPO3\CMS\Core\Page\JavaScriptItems;
use TYPO3\CMS\Core\Page\JavaScriptModuleInstruction;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
......@@ -569,11 +568,6 @@ class FormInlineAjaxController extends AbstractFormEngineAjaxController
}
$scriptItems->addGlobalAssignment(['TYPO3' => ['lang' => $labels]]);
}
foreach ($childResult['requireJsModules'] ?? [] as $module) {
if ($module instanceof JavaScriptModuleInstruction) {
$scriptItems->addJavaScriptModuleInstruction($module);
}
}
$this->addRegisteredRequireJsModulesToJavaScriptItems($childResult, $scriptItems);
// @todo deprecate modules with arbitrary JavaScript callback function in TYPO3 v12.0
$jsonResult['requireJsModules'] = $this->createExecutableStringRepresentationOfRegisteredRequireJsModules($childResult, true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment