Skip to content

Commit 2c6d40d

Browse files
committed
[BUGFIX] Read ContentObjectRenderer from currentContentObject attribute if set
1 parent 4e0cd50 commit 2c6d40d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Classes/Utility/ContentObjectFetcher.php

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public static function resolve(?ConfigurationManagerInterface $configurationMana
3939

4040
protected static function resolveFromRequest(ServerRequestInterface $request): ?ContentObjectRenderer
4141
{
42+
if (($cObject = $request->getAttribute('currentContentObject')) instanceof ContentObjectRenderer) {
43+
return $cObject;
44+
}
4245
/** @var TypoScriptFrontendController $controller */
4346
$controller = $request->getAttribute('frontend.controller');
4447
return $controller instanceof TypoScriptFrontendController ? $controller->cObj : null;

0 commit comments

Comments
 (0)