Avoid null-pointer exception

This commit is contained in:
Björn Fromme
2022-03-08 17:47:50 +01:00
parent 77e2e7690b
commit 3298885ef0
2 changed files with 19 additions and 10 deletions
@@ -43,15 +43,17 @@
<f:format.nl2br>{newsItem.teaser}</f:format.nl2br>
</p>
</f:if>
<n:renderMedia news="{newsItem}" imgClass="block w-full h-auto mb-4" videoClass="video-wrapper" audioClass="audio-wrapper">
<f:render partial="Detail/MediaContainer" arguments="{media: newsItem.media, settings:settings, id: newsItem.uid}" />
<f:format.html>{newsItem.bodytext}</f:format.html>
<f:if condition="{newsItem.contentElements}">
<div class="flex flex-col space-y-4">
<f:cObject typoscriptObjectPath="lib.tx_news.contentElementRendering">{newsItem.contentElementIdList}</f:cObject>
</div>
</f:if>
</n:renderMedia>
<div data-rte-content>
<n:renderMedia news="{newsItem}" imgClass="block w-full h-auto mb-4" videoClass="video-wrapper" audioClass="audio-wrapper">
<f:render partial="Detail/MediaContainer" arguments="{media: newsItem.media, settings:settings, id: newsItem.uid}" />
<f:format.html>{newsItem.bodytext}</f:format.html>
<f:if condition="{newsItem.contentElements}">
<div class="flex flex-col space-y-4">
<f:cObject typoscriptObjectPath="lib.tx_news.contentElementRendering">{newsItem.contentElementIdList}</f:cObject>
</div>
</f:if>
</n:renderMedia>
</div>
<f:if condition="{newsItem.relatedFiles}">
<h3 class="headline headline--underlined">
Dateien