Project

General

Profile

Actions

Bug #83777

closed

EXT form: uncaught exception in backend page module preview

Added by Andreas Kießling almost 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2018-02-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:
Remote Sprint

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();
                }


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #89662: PHP Warning shown in form content element in Web > PageClosedStephan Großberndt2019-11-13

Actions
Actions

Also available in: Atom PDF