Skip to content

Commit

Permalink
[TASK] Log a warning if fluid-based preview template couldn't be rend…
Browse files Browse the repository at this point in the history
…ered

A warning is logged if the fluid-based preview template for a
content element could not be rendered.

The logged warning includes
- the UID of the content element
- the resulting path to the template file
- and the exception message

Resolves: #87015
Releases: master, 8.7
Change-Id: I2cd100a5140a07845145b16259b7cbe3e5eed852
Reviewed-on: https://review.typo3.org/58960
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Alexander Grein <alexander.grein@gmail.com>
Tested-by: Alexander Grein <alexander.grein@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
  • Loading branch information
josefglatz authored and georgringer committed Nov 27, 2018
1 parent d7065b3 commit 8413d6d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion typo3/sysext/backend/Classes/View/PageLayoutView.php
Expand Up @@ -2204,7 +2204,12 @@ public function tt_content_drawItem($row)
$out = $view->render();
$drawItem = false;
} catch (\Exception $e) {
// Catch any exception to avoid breaking the view
$this->logger->warning(sprintf(
'The backend preview for content element %d can not be rendered using the Fluid template file "%s": %s',
$row['uid'],
$fluidTemplateFile,
$e->getMessage()
));
}
}
}
Expand Down

0 comments on commit 8413d6d

Please sign in to comment.