Skip to content
Snippets Groups Projects
Commit 27c65c73 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[BUGFIX] Fix crash if form is saved in form_definitions

parent b07baf41
No related branches found
No related tags found
No related merge requests found
......@@ -63,8 +63,8 @@ class FormEditorController extends \TYPO3\CMS\Form\Controller\FormEditorControll
*
* @param string $formPersistenceIdentifier
* @param FormDefinitionArray $formDefinition
* @internal
* @throws \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException
* @internal
*/
public function saveFormAction(string $formPersistenceIdentifier, FormDefinitionArray $formDefinition) {
$registrationService = $this->objectManager->get(RegisterService::class);
......@@ -116,10 +116,16 @@ class FormEditorController extends \TYPO3\CMS\Form\Controller\FormEditorControll
sprintf('Could not access storage with uid "%d".', $storageUid)
);
}
$absoluteFilePath = $storage->getFile($fileIdentifier);
$absoluteFilePath = PATH_site . $storage->getFile($fileIdentifier)->getPublicUrl();
}
$parsedYaml = Yaml::parse(file_get_contents($absoluteFilePath));
try {
$parsedYaml = Yaml::parse(file_get_contents($absoluteFilePath));
} catch (\Exception $exception) {
throw new \InvalidArgumentException(
sprintf('Could not access storage "%s".', $absoluteFilePath)
);
}
$renderables = self::getFormFieldsRecursive([0 => $parsedYaml]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment