An error occurred while processing the template.
The following has evaluated to null or missing:
==> result.datePublished [in template "10155#10193#NEWSFEED_ARTICLE" at line 21, column 20]
----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign datePub = result.datePublishe... [in template "10155#10193#NEWSFEED_ARTICLE" at line 21, column 1]
---- 1<#setting datetime_format="dd.MM.yyyy" /> 2 3<#assign PrimaryKey = .vars["reserved-article-resource-prim-key"].data?number /> 4<#assign articleId = .vars['reserved-article-id'].data /> 5<#assign articleTitle = .vars['reserved-article-title'].data /> 6<#assign articleDescription = .vars['reserved-article-description'].data /> 7<#assign articleImage = .vars['reserved-article-small-image-url'].data /> 8<#assign webContentClassName = "com.liferay.journal.model.JournalArticle"/> 9<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 10 11<#-- Iterate over keys and values --> 12<#assign AssetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService")/> 13<#assign result = restClient.get("/headless-delivery/v1.0/structured-contents/" + PrimaryKey + "?nestedFields=embeddedTaxonomyCategory") /> 14<#-- 15<ul> 16 <#list result?keys as cur_key> 17 <li>${cur_key}</li> 18 </#list> 19</ul> 20--> 21<#assign datePub = result.datePublished?datetime("yyyy-MM-dd'T'HH:mm:ss'Z'")> 22 23<#assign typologies = []/> 24<#assign powers = [] /> 25 26 27<#if result.taxonomyCategoryBriefs??> 28 29 <#list result.taxonomyCategoryBriefs as typology> 30 <#assign cur_cat = typology.embeddedTaxonomyCategory /> 31 <#assign cur_catName = cur_cat.name /> 32 <#assign cur_catDescription = cur_cat.name /> 33 <#assign cur_vocName = cur_cat.parentTaxonomyVocabulary.name /> 34 <#if cur_vocName == "020 Typologies" && cur_catName != "News-Accueil" && cur_catName != "non-administration"> 35 <#-- description = ${cur_cat.description}; name= ${cur_cat.name}; --> 36 <#assign typologies = typologies + [cur_catDescription] /> 37 </#if> 38 <#if cur_vocName == "010 Pouvoirs" || cur_vocName == "010 Gewalten"> 39 <#assign powers = powers + [cur_catDescription] /> 40 </#if> 41 <#if cur_vocName == "News ICT VS"> 42 <#assign powers = powers + ["#" + cur_catName+" "] /> 43 </#if> 44 </#list> 45 46</#if> 47 48 49<style> 50 51 .secondaryContents .card { 52 background-color: inherit; 53 } 54 55 56 .p_category > p { 57 margin-bottom: 0; 58 } 59 60</style> 61 62<#-- <article id="id${articleId}" class="ivs-text-body" data-share-article-id="${articleId}" data-share-group-id="${groupId}"> --> 63<article id="id${articleId}" class="ivs-text-body"> 64 65 <div class="row"> 66 67 <div class="col-12 col-md-6 col-xl-8"> 68 69 70 <header> 71 <div class="mb-4"> 72 <#list typologies as cur_cat> 73 <span class="bg-red text-white px-2 py-1 mr-2">${cur_cat}</span> 74 </#list> 75 <span class="text-red"> 76 <time datetime="${datePub?string("yyyy-MM-dd")}"> 77 ${datePub?string("dd.MM.yyyy")} 78 </time> 79 </span> 80 81 <#list powers as cur_cat> 82 <span class="p_category float-right pl-3">${cur_cat} </span> 83 </#list> 84 85 </div> 86 87 88 <#if basic_data.show_title.getData() == "big"> 89 <h1 id="inhalt_${articleId}" class="display-4 mb-4">${articleTitle}</h1> 90 <#elseif basic_data.show_title.getData() == "default"> 91 <h1 id="inhalt_${articleId}" class="mb-3">${articleTitle}</h1> 92 </#if> 93 </header> 94 95 96 <div class="row"> 97 98 <#if basic_data.show_small_img.getData() == "left"> 99 <div class="col-12 col-sm-6 col-lg-4"> 100 <img src="${articleImage}" class="img-fluid img-thumbnail" alt=""> 101 </div> 102 </#if> 103 <div class="col"> 104 <#if getterUtil.getBoolean(basic_data.show_description.getData())> 105 <div class="lead">${articleDescription}</div> 106 </#if> 107 </div> 108 <#if basic_data.show_small_img.getData()== "right"> 109 <div class="col-12 col-sm-6 col-lg-4"> 110 <img src="${articleImage}" class="img-fluid img-thumbnail" alt=""> 111 </div> 112 </#if> 113 114 </div> 115 116 117 <#if introduction??> 118 <div class="module_introduction"> 119 ${introduction.getData()} 120 </div> 121 </#if> 122 123 <#if basic_data.show_small_img.getData()== "left" || basic_data.show_small_img.getData()== "right"> 124 <hr /> 125 </#if> 126 127 <#if section.getSiblings()?has_content> 128 <#list section.getSiblings() as cur_section> 129 <#if cur_section.title.getData()?trim != ""> 130 <h2 class="h4" id="s${articleId+cur_section?index}">${cur_section.title.getData()}</h2> 131 </#if> 132 ${cur_section.content.getData()} 133 </#list> 134 </#if> 135 136 <#if secondary.secondarycontent.getSiblings()?has_content> 137 <#list secondary.secondarycontent.getSiblings() as cur_webContent> 138 139 140 <#if cur_webContent.getData() != "" && cur_webContent.look?? && cur_webContent.look.getData() == "show_below"> 141 <#assign article = getArticle(cur_webContent) /> 142 <#if article != "" > 143 <#assign articleContent = getArticleContent(article.getGroupId(), article.getArticleId(), article.getDDMTemplateKey()) /> 144 <#-- <@JournalContentPortlet article.getArticleId() article.getGroupId() />--> 145 ${articleContent} 146 147 </#if> 148 </#if> 149 </#list> 150 </#if> 151 152 153 154 155 156 </div> 157 <div class="col-12 col-md-6 col-xl-4"> 158 159 <#if Image?? && Image.getData() != "" > 160 <#if !Image.showImage?? || (Image.showImage?? && getterUtil.getBoolean(Image.showImage.getData()))> 161 <figure> 162 <img class="img-fluid mb-4" alt="${Image.getAttribute("alt")}" data-fileentryid="${Image.getAttribute("fileEntryId")}" src="${Image.getData()}" /> 163 <#if Image.legendeImage?? && Image.legendeImage.getData() != ""> 164 165 <figcaption class="text-secondary font-weight-light text-right" style="margin-top:-25px;"><small>${Image.legendeImage.getData()}</small></figcaption> 166 167 </#if> 168 </figure> 169 </#if> 170 </#if> 171 172 <#if secondary.secondarycontent.getSiblings()?has_content> 173 <div class="secondaryContents"> 174 <#list secondary.secondarycontent.getSiblings() as cur_webContent> 175 <#if cur_webContent.getData() != "" && cur_webContent.look?? && cur_webContent.look.getData() != "show_below"> 176 <#assign look = cur_webContent.look.getData() /> 177 <#assign cssClass = "" /> 178 179 <#if look == "gray" > 180 <#assign cssClass = "bg-light" /> 181 </#if> 182 <#assign article = getArticle(cur_webContent) /> 183 <#if article != "" > 184 <#assign articleContent = getArticleContent(article.getGroupId(), article.getArticleId(), article.getDDMTemplateKey()) /> 185 <div class="${cssClass}"> 186 ${articleContent} 187 </div> 188 189 </#if> 190 </#if> 191 </#list> 192 </div> 193 </#if> 194 195 196 <@relatedContentCard /> 197 198 <!-- <share-link width="25"></share-link> --> 199 200 </div> 201 202 </div> 203 204</article> 205 206<#macro relatedContentCard> 207 208 209 <#local relatedList = result.relatedContents /> 210 211 212 <#if relatedList?size != 0 > 213 <div class="card mt-2"> 214 <div class="card-header"> 215 <h3 class="h5 mb-0">Siehe auch</h3> 216 </div> 217 <ul class="list-group list-group-flush mb-2"> 218 <#list relatedList as cur_rel> 219 220 <#assign cur_relEntry = restClient.get("/headless-delivery/v1.0/structured-contents/" + cur_rel.id) /> 221 <li class="list-group-item list-group-item-action"> 222 223 <span style="font-size:0.8rem;" class="d-block">${cur_relEntry.datePublished?datetime("yyyy-MM-dd'T'HH:mm:ss'Z'")?string("yyyy-MM-dd")}</span> 224 <a href="/web/communication/detail?groupId=${cur_relEntry.siteId}&articleId=${cur_relEntry.key}" class="stretched-link">${cur_rel.title}</a> 225 226 </li> 227 </#list> 228 </ul> 229 </div> 230 </#if> 231 232</#macro> 233 234<#function getArticle webContentString> 235 <#local webContentJSON = jsonFactoryUtil.createJSONObject(webContentString.getData()) /> 236 <#local webContentClassPK = getterUtil.getLong(webContentJSON.getLong("classPK")) /> 237 <#if JournalArticleLocalService.fetchLatestArticle(webContentClassPK)??> 238 <#return JournalArticleLocalService.fetchLatestArticle(webContentClassPK) /> 239 <#else> 240 <#return "" /> 241 </#if> 242 243</#function> 244 245<#function getArticleContent gid aid DDMTemplateKey> 246 <#local article = JournalArticleLocalService.getArticle(gid?number, aid?upper_case) /> 247 <#local articleContent = JournalArticleLocalService.getArticleContent(article, DDMTemplateKey, null, locale, model, themeDisplay) /> 248 <#if articleContent?? > 249 <#return articleContent /> 250 </#if> 251 <#return "" /> 252</#function> 253 254 255 256<#macro JournalContentPortlet aid gid> 257 <#local preferencesMap = { 258 "portletSetupPortletDecoratorId": "barebone", 259 "articleId":aid, 260 "groupId":gid 261 262 } /> 263 264 <@liferay_portlet["runtime"] 265 defaultPreferences= "${freeMarkerPortletPreferences.getPreferences(preferencesMap)}" 266 persistSettings=false 267 settingsScope="portletInstance" 268 instanceId="B${gid?upper_case}${aid?upper_case}" 269 portletName="com_liferay_journal_content_web_portlet_JournalContentPortlet" 270 /> 271 272 273 <#local VOID = freeMarkerPortletPreferences.reset() /> 274</#macro>