Bug #83777
closedEXT form: uncaught exception in backend page module preview
100%
Description
To protect the user editable form definitions, i configured a second file mount and moved the yaml files there.
Unfortunately, the backed preview hook does not catch the exception, that the LocalDriver throws, when i open my existing page with the form pointing to the old storage location, see
https://github.com/TYPO3/TYPO3.CMS/blob/160f8db69f423e4db4e645f3c751a707c989db0d/typo3/sysext/form/Classes/Hooks/FormPagePreviewRenderer.php#L89
#1314516809: File /user_upload/requestForm.yaml does not exist. (More information)
InvalidArgumentException thrown in file
/var/www/dist/typo3_src/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php in line 253.
IMHO, the preview hook should catch all exceptions, not just these configured ones, because otherwise i can't even reconfigure / delete the for element with the page module.
I don't know, if the NoSuchFileException will be thrown from another driver? But the message seems also wrong, since $messageText is only declared in the protected function below.
Possible fix:
} catch (NoSuchFileException $e) {
$this->addInvalidFrameworkConfigurationFlashMessage($e);
$formLabel = $e->getMessage();
} catch (ParseErrorException $e) {
$this->addInvalidFrameworkConfigurationFlashMessage($e);
$formLabel = sprintf(
$this->getLanguageService()->sL(self::L10N_PREFIX . 'tt_content.preview.invalidFrameworkConfiguration'),
$persistenceIdentifier
);
} catch (\Exception $e) {
$this->addInvalidFrameworkConfigurationFlashMessage($e);
$formLabel = $e->getMessage();
}
Updated by Andreas Kießling almost 7 years ago
- Subject changed from EXT form: uncaught exception in page preview to EXT form: uncaught exception in backend page module preview
Updated by Gerrit Code Review almost 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55833
Updated by Gerrit Code Review almost 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55833
Updated by Gerrit Code Review almost 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55833
Updated by Gerrit Code Review over 6 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55833
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56056
Updated by Ralf Zimmermann over 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a995ab1f961eb0c91254312e8143c3d8adc68fc1.
Updated by Mathias Brodala about 5 years ago
- Related to Bug #89662: PHP Warning shown in form content element in Web > Page added