Skip to content

f:uri.resource() in f:be.pageRenderer causes SystemResourceDefinitionNotFoundException in TYPO3 14 #22

Description

@mayfeld

TYPO3 Version: 14.3.1 (Classic Mode)
Extension Version: er24_rechtstexte 4.0.0
PHP Version: 8.4.21
Description:
Opening the eRecht24 backend module throws a fatal SystemResourceDefinitionNotFoundException, making the module completely unusable.
Exception:
#1763381519 TYPO3\CMS\Core\SystemResource\Exception\SystemResourceDefinitionNotFoundException
Project path "typo3conf/ext/er24_rechtstexte/Resources/Public/Css/BackendModule.css?1778334320" is not allowed. Define custom resources if required.
Root Cause:
In Resources/Private/Layouts/Backend.html, the CSS file is passed to f:be.pageRenderer using f:uri.resource():
html<f:be.pageRenderer includeCssFiles="{0: '{f:uri.resource(path: 'Css/BackendModule.css')}'}"
f:uri.resource() generates a URL with an appended file modification timestamp (e.g. ...BackendModule.css?1778334320). TYPO3 14's PageRenderer::addCssFile() passes this string through the new SystemResource API, which cannot handle paths containing query string parameters — causing the exception.
Fix:
Replace the dynamic f:uri.resource() call with a static EXT: path, which PageRenderer resolves correctly through the package system:
html<f:be.pageRenderer includeCssFiles="{0: 'EXT:er24_rechtstexte/Resources/Public/Css/BackendModule.css'}"
This bypasses the timestamp issue and allows the SystemResource API to resolve the path correctly.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions