Bug #99458
closedForm module throws error, when there is no TS database template
100%
Description
When using the newly introduced Event `AfterTemplatesHaveBeenDeterminedEvent` to skip sys_template records, the Forms Module throws an exception.
We use the bolt extension (https://github.com/b13/bolt) to make integrators life more easy and put all ts-templates under version control.
The module throws the following exception
TYPO3\CMS\Form\Controller\AbstractBackendController::resolveResourcePaths(): Argument #1 ($resourcePaths) must be of type array, null given, called in /var/www/html/vendor/typo3/cms-form/Classes/Controller/FormManagerController.php on line 80
This exception is thrown when no Typoscript template (in this case the extensions "yamlConfigurations" settings) is found.
After some debugging I would guess, that this is somehow caused by the extbase module.
The requests site-attribute is of Type "NullSite". The typoscript is fetched by SysTemplateRepository->getSysTemplateRowsByRootline()
The requests site attribute of Typoscript Module is of type "Site" - there everything is fine.
The typoscript in this case is fetched by SysTemplateRepository->getSysTemplateRowsByRootlineWithUidOverride()
Both getters respects the event at the end, so the error must occur earlier.
Updated by Christian Kuhn almost 2 years ago
- Related to Feature #97816: New TypoScript parser added
Updated by Kevin Appelt over 1 year ago
- Status changed from New to Accepted
- Priority changed from Should have to Must have
- Target version set to 12.3
- Is Regression set to Yes
Updated by Chris Müller over 1 year ago
I can confirm this with a more or less default installation from main branch. Clicking on the form module immediately throws the error:
PHP Warning: Undefined array key "formManager" in /var/www/html/typo3/sysext/form/Classes/Controller/FormManagerController.php line 80
As far as I can see, the Typoscript added in ext_localconf.php is not returned by ConfigurationManager.
I am not aware using the mentioned event.
Updated by Christian Kuhn over 1 year ago
- Status changed from Accepted to Needs Feedback
Currently unable to reproduce, here is what i did:
- git clone https://github.com/typo3/typo3
- composer install
- call installer, yadda yadda, "take me straight to the backend"
- BE login
- -> no existing sys_templates, no pages, no nothing
- -> ext:form BE module can be called without error
- typo3conf/ext: git clone git@github.com:b13/bolt.git
- load extension
- -> ext:form BE module can be called without error
What do I miss?
Updated by Henrik Ziegenhain over 1 year ago
Thanks for your investigations.
I retried it with my current project.
I updated `typo3/cms-*`and `b13/bolt` - error still occurs for me.
Next I need to remove some other third-party extension to find the cause.
Updated by Henrik Ziegenhain over 1 year ago
Got it: You need at least one empty page with activated "use as root page".
Btw: This is reproducable even without b13/bolt
Updated by Chris Müller over 1 year ago
Hmm, had two sites with "Use as root page" activated, and had the mentioned error. When I delete one site (so only one root page is left), the error is gone.
Updated by Benni Mack over 1 year ago
- Target version changed from 12.3 to 12 LTS
Updated by Gerrit Code Review over 1 year ago
- Status changed from Needs Feedback to Under Review
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78599
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78599
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78650
Updated by Christian Kuhn over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 141d185ea970157dcc1b42fd06476294250e4616.