[BUGFIX] Respect custom prototypes within the form editor 92/56692/2
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Mon, 16 Apr 2018 16:56:01 +0000 (18:56 +0200)
committerBenjamin Kott <benjamin.kott@outlook.com>
Tue, 17 Apr 2018 21:22:18 +0000 (23:22 +0200)
Respect the configured prototypeName within the formDefinition
on form editor load.

Resolves: #84750
Releases: master
Change-Id: I0b720387f058a708920e40625c897596a73a1c66
Reviewed-on: https://review.typo3.org/56692
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Tested-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Simon Gilli <typo3@gilbertsoft.org>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
typo3/sysext/form/Classes/Controller/FormEditorController.php

index 463b73a..8959ddd 100644 (file)
@@ -72,9 +72,9 @@ class FormEditorController extends AbstractBackendController
             throw new PersistenceManagerException('Edit a extension formDefinition is not allowed.', 1478265661);
         }
 
-        $prototypeName = $prototypeName ?: $formDefinition['prototypeName'] ?? 'standard';
         $formDefinition = $this->formPersistenceManager->load($formPersistenceIdentifier);
         $formDefinition = ArrayUtility::stripTagsFromValuesRecursive($formDefinition);
+        $prototypeName = $prototypeName ?: $formDefinition['prototypeName'] ?? 'standard';
 
         $formDefinition['prototypeName'] = $prototypeName;