Fehler bei der Verarbeitung der Vorlage.
The following has evaluated to null or missing: ==> currentArticleId.embeddedArticleId [in template "20116#20154#COLUMN" at line 26, column 45] ---- 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 embeddedArticleIdRef = curren... [in template "20116#20154#COLUMN" in macro "articleEmbed" at line 26, column 13] - Reached through: @articleEmbed articleId=embeddedArtic... [in template "20116#20154#COLUMN" at line 77, column 5] ----
1<#-- Retrieve the published date meta data field of the web content -->
2<#assign displaydate = .vars['reserved-article-display-date'].data>
3<#-- Save the original page locale for later -->
4<#assign originalLocale = locale>
5<#-- Set the page locale to the portals default locale -->
6<#setting locale = localeUtil.getDefault()>
7<#-- Parse the date to a date object -->
8<#assign displaydate = displaydate?datetime("EEE, d MMM yyyy HH:mm:ss Z")>
9<#-- Set the page locale back to the original page locale -->
10<#assign locale = originalLocale>
11
12<#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") />
13<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
14<#assign group = groupLocalService.getGroup(siteGroupId) />
15<#assign globalGroupId = themeDisplay.getCompanyGroupId() />
16<#assign facebookLink = group.getExpandoBridge().getAttribute("Social Media Facebook")!"" />
17<#assign instagramLink = group.getExpandoBridge().getAttribute("Social Media Instagram")!"" />
18<#assign linkedInLink = group.getExpandoBridge().getAttribute("Social Media LinkedIn")!"" />
19<#assign embeddedArticleId=parentStructureFieldSet31255.embeddedArticleIdFieldSet/>
20
21
22<#macro articleEmbed position articleId="">
23 <#if articleId?has_content && articleId.getSiblings()?has_content>
24
25 <#list articleId.getSiblings() as currentArticleId>
26 <#assign embeddedArticleIdRef = currentArticleId.embeddedArticleId.getData()?string />
27
28 <#if embeddedArticleIdRef?? && embeddedArticleIdRef?has_content && currentArticleId.embeddedArticlePosition?has_content && currentArticleId.embeddedArticlePosition.getData() == position>
29 <#-- helpful debug information
30 <h2>Article Id: ${currentArticleId.getData()?string}</h2>
31 <h3>Site group Id: ${siteGroupId}</h3>
32 <h3>Global group Id: ${globalGroupId}</h3>
33 -->
34
35 <#attempt>
36 <#local articleGlobal = journalArticleLocalService.fetchArticle(globalGroupId, embeddedArticleIdRef) />
37 <#--
38 TODO: I would like to use <@liferay_portlet> macro here, but for some reason it is unable to display global articles
39 - even though I verified that the global article is correctly returned by the service
40 -->
41 <#local webArticleContent = journalArticleLocalService.getArticleContent(articleGlobal, articleGlobal.getDDMTemplateKey(), "VIEW", locale, objectUtil("com.liferay.portal.kernel.portlet.PortletRequestModel", renderRequest, renderResponse), themeDisplay)/>
42
43 ${webArticleContent}
44 <#recover>
45 </#attempt>
46 <#attempt>
47 <#if !articleGlobal??>
48 <#local article = journalArticleLocalService.fetchArticle(siteGroupId, embeddedArticleIdRef) />
49
50 <#local preferencesMap = {
51 "portletSetupPortletDecoratorId": "barebone",
52 "groupId": siteGroupId,
53 "articleId": embeddedArticleIdRef
54 } />
55 <#local instanceId = "news_embedded_" + embeddedArticleIdRef />
56
57 <@liferay_portlet["runtime"]
58 defaultPreferences=freeMarkerPortletPreferences.getPreferences(preferencesMap)
59 instanceId="${instanceId}"
60 portletProviderAction=portletProviderAction.VIEW
61 portletName="com_liferay_journal_content_web_portlet_JournalContentPortlet"/>
62 </#if>
63 <#recover>
64 </#attempt>
65 </#if>
66 </#list>
67 </#if>
68</#macro>
69<div class="container ">
70 <#if (title)??><h1>${title.getData()}</h1></#if>
71 <#if (parentStructureFieldSet31255.title.getData())??>
72 <h1>${parentStructureFieldSet31255.title.getData()}</h1>
73 </#if>
74
75 <p class="meta">${displaydate?string["dd.MM.yyyy"]}<#if authorName?? && authorName.getData() != ""> | ${authorName.getData()}</#if></p>
76
77 <@articleEmbed articleId=embeddedArticleId position="afterTitle" />
78 <p class="lead">${parentStructureFieldSet31255.summary.getData()}</p>
79 <#if parentStructureFieldSet31255.folderId?? && parentStructureFieldSet31255.folderId.getData() != "">
80 <#assign folderId = parentStructureFieldSet31255.folderId.getData()/>
81 <#assign instanceId = "folder_" + folderId/>
82 <#assign preferences = freeMarkerPortletPreferences.getPreferences({
83 "rootFolderId": "${folderId}",
84 "displayStyleGroupId": "20145",
85 "mimeTypes": ["image/jpeg", "image/png", "image/jpg"]
86 }) />
87 <#if imageGalleryTitle?? && imageGalleryTitle.getData() != "">
88 <h2>${imageGalleryTitle.getData()}</h2>
89 </#if>
90 <@liferay_portlet["runtime"]
91 defaultPreferences="${preferences}"
92 instanceId="${instanceId}"
93 portletName="com_liferay_document_library_web_portlet_IGDisplayPortlet"
94 />
95 <#elseif parentStructureFieldSet31255.picture.getData()?? && parentStructureFieldSet31255.picture.getData() != "">
96 <p class="news-details__image-container">
97 <#assign pictureLink = parentStructureFieldSet31255.pictureLink/>
98 <#if pictureLink?? && pictureLink.getData()?? && pictureLink.getData() != "">
99 <a class="news-details__image-link" href="${(pictureLink??)?then(pictureLink.getData(),"")}">
100 <img
101 data-fileentryid="${parentStructureFieldSet31255.picture.getAttribute("fileEntryId")}"
102 alt="${parentStructureFieldSet31255.picture.getAttribute("alt")}"
103 src="${parentStructureFieldSet31255.picture.getData()}"
104 />
105 </a>
106 <#else>
107 <span class="news-details__image-link">
108 <img
109 data-fileentryid="${parentStructureFieldSet31255.picture.getAttribute("fileEntryId")}"
110 alt="${parentStructureFieldSet31255.picture.getAttribute("alt")}"
111 src="${parentStructureFieldSet31255.picture.getData()}"
112 />
113 </span>
114 </#if>
115 <#if parentStructureFieldSet31255.pictureLegend?? && parentStructureFieldSet31255.pictureLegend.getData()??><span class="meta">${parentStructureFieldSet31255.pictureLegend.getData()}</span></#if>
116 </p>
117 </#if>
118 <@articleEmbed articleId=embeddedArticleId position="beforeMain" />
119 <p>${parentStructureFieldSet31255.content.getData()}</p>
120 <@articleEmbed articleId=embeddedArticleId position="afterMain" />
121
122 <#assign listMedia = parentStructureFieldSet31255.attachmentsFieldSet.mediaFieldSet.getSiblings() />
123 <#if listMedia[0].media.getData()?has_content>
124 <h5 class="mb-3 mt-5">${parentStructureFieldSet31255.attachmentsFieldSet.attachments.getData()}</h5>
125 <#if parentStructureFieldSet31255.attachmentsFieldSet.attachments.getSiblings()?has_content>
126 <ul class="list-unstyled">
127 <#list listMedia as element>
128 <#if element.media.getData()?has_content>
129 <#assign mediaID = element.media.getData()?string?split("/")[7]?split("?")[0]>
130 <#assign groupId = element.media.getData()?string?split("/")[4]?number>
131 <#assign DLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") />
132 <#assign file=DLFileEntryLocalService.getFileEntryByUuidAndGroupId(mediaID, groupId)>
133 <#assign fileTitle = file.title>
134 <#if element.mediaTitle?? && element.mediaTitle.getData()?? && element.mediaTitle.getData() != "">
135 <#assign fileTitle = element.mediaTitle.getData()>
136 </#if>
137
138 <li class="mb-2">
139 <a download target="_blank" href="${element.media.getData()}">
140 <i class="mr-3 icon icon-download-3"></i>
141 ${fileTitle} (${file.extension?upper_case}, ${(file.getSize()/1024)?string(",##0")} KB)
142 </a>
143 </li>
144 </#if>
145 </#list>
146 </ul>
147 </#if>
148 </#if>
149
150 <@articleEmbed articleId=embeddedArticleId position="atEnd" />
151
152 <#if (facebookLink?? && facebookLink != "") || (instagramLink?? && instagramLink != "") || (linkedInLink?? && linkedInLink != "")>
153 <div class="news-details__social-media-section">
154 <p>
155 <#if socialMediaTitle?? && socialMediaTitle.getData()?? && socialMediaTitle.getData() != "">
156 ${socialMediaTitle.getData()}
157 <#else>
158 Folgen Sie uns auf Social Media
159 </#if>
160 </p>
161 <div class="news-details__social-media-links">
162 <#if facebookLink?? && facebookLink != ""><a href="${facebookLink}"><i class="icon-facebook"></i></a></#if>
163 <#if instagramLink?? && instagramLink != ""><a href="${instagramLink}"><i class="icon-instagram"></i></a></#if>
164 <#if linkedInLink?? && linkedInLink != ""><a href="${linkedInLink}"><i class="icon-linkedin"></i></a></#if>
165 </div>
166 </div>
167 </#if>
168
169 <hr>
170
171 <a class="mt-auto" href="javascript:window.history.back()">
172 <i class="mr-2 icon icon-arrow-left-12"></i>
173 <@liferay.language key="back"/>
174 </a>
175</div>
176
177<script>
178 const wrapper = document.querySelector('.card-page');
179 if (wrapper) {
180 const elements = Array.from(wrapper.getElementsByTagName('picture'));
181 elements.map(element => element.nextSibling.nodeValue = '');
182 }
183</script>
184
185<!--Updated EBS template by clavisIT ddmSync-->