Issue Bug Closed

#109449ContentObjectRenderer without TypoScript

Achim Fritz 04/01/26, 06:08 updated 04/21/26, 11:30

Description

calling ContentObjectRenderer without having frontend.typoscript request attribute throws an error.
this can happen if you call the ContentObjectRenderer in a request middleware, e.g.

        $contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
        $contentObject->setRequest($request);
        $contentObject->start([]);
        $config = [
            'makelinks' => 1,
            'htmlSanitize' => 1,
            'tags.' => [
                'a' => 'TEXT',
                'a.' => [
                    'current' => 1,
                    'typolink.' => [
                        'parameter.' => ['data' => 'parameters:href'],
                        'ATagParams.' => ['data' => 'parameters:allParams'],
                        'forceAbsoluteUrl' => 1,
                    ],
                ],
            ],
        ];

        $text = $contentObject->parseFunc('foo', $config, '< lib.parseFunc_RTE');

This happens on TYPO3 v13 and v14
i will provide a patch

Reviews 2

Files 1

History 25

  1. Anonymous commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-04-01T15:35:10+00:00" > 04/01/26, 15:35 </span>

    Applied in changeset commit:5b3c1c02b312209466aa3115dd50415cfbed3c4e.