Project

General

Profile

Actions

Bug #99458

closed

Form module throws error, when there is no TS database template

Added by Henrik Ziegenhain over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
Start date:
2023-01-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
AfterTemplatesHaveBeenDeterminedEvent getTemplateRows
Complexity:
Is Regression:
Yes
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #97816: New TypoScript parserClosed2022-06-27

Actions
Actions #1

Updated by Christian Kuhn over 1 year ago

Actions #2

Updated by Kevin Appelt about 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
Actions #3

Updated by Chris Müller about 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.

Actions #4

Updated by Christian Kuhn about 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 :b13/bolt.git
  • load extension
  • -> ext:form BE module can be called without error

What do I miss?

Actions #5

Updated by Henrik Ziegenhain about 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.

Actions #6

Updated by Henrik Ziegenhain about 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

Actions #7

Updated by Chris Müller about 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.

Actions #8

Updated by Benni Mack about 1 year ago

  • Target version changed from 12.3 to 12 LTS
Actions #9

Updated by Gerrit Code Review about 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

Actions #10

Updated by Gerrit Code Review about 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

Actions #11

Updated by Gerrit Code Review about 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

Actions #12

Updated by Christian Kuhn about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF