Issue Bug Closed

#99287Request missing for StandardContentPreviewRenderer View

Daniel Siepmann 12/06/22, 13:10 updated 10/15/24, 09:30

Description

Integrators are able to configure a custom Fluid template per content element.
This template is rendered via StandardContentPreviewRenderer.

Integrators can use the Uri/EditRecordViewHelper which will break unless the Request is provided by Rendering Context, leading to:

(1/1) Error

Call to a member function getAttribute() on null
in /project/vendor/typo3/cms-backend/Classes/ViewHelpers/Uri/EditRecordViewHelper.php line 77

        }
        if (empty($arguments['returnUrl'])) {
            /** @var RenderingContext $renderingContext */
            $request = $renderingContext->getRequest();
            $arguments['returnUrl'] = $request->getAttribute('normalizedParams')->getRequestUri();
        }

        $params = [
            'edit' => [$arguments['table'] => [$arguments['uid'] => 'edit']],

Reviews 2