Homeoffice – Rechtliche Rahmenbedingungen - Homeoffice – Rechtliche Rahmenbedingungen
Blog
Fehler bei der Verarbeitung der Vorlage.
Java method "com.sun.proxy.$Proxy602.getArticleContent(long, String, String, String, String, com.liferay.portal.kernel.theme.ThemeDisplay)" threw an exception when invoked on com.sun.proxy.$Proxy602 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@7fc76a14"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: article_content = JournalArticleLocal... [in template "782690#782725#841443" at line 152, column 25] - Reached through: #assign-container [in template "782690#782725#841443" at line 149, column 21] ----
1<#-- Services -->
2<#assign
3 JournalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
4 JournalArticleLocalService = JournalArticleService
5 DMStructureService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")
6 OrderByComparatorFactoryUtil = staticUtil["com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil"]
7 journalArticleResourceLocalServiceUtil = staticUtil["com.liferay.journal.service.JournalArticleResourceLocalServiceUtil"]
8 assetCategoryServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryServiceUtil"]
9 assetTagServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetTagServiceUtil"]
10 assetEntryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryService")
11 ClassNameLocalServiceUtil = staticUtil["com.liferay.portal.kernel.service.ClassNameLocalServiceUtil"]
12/>
13
14<#-- Reserved-article-data -->
15<#assign
16 entryTitle = .vars['reserved-article-title'].data
17 entryId = .vars['reserved-article-id'].data
18 displaydate = .vars['reserved-article-display-date'].data
19/>
20
21<#-- getCategories -->
22<#assign
23 articleResourcePK = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId, entryId)
24 categoryList = assetCategoryServiceUtil.getCategories("com.liferay.journal.model.JournalArticle",articleResourcePK)
25/>
26
27<#-- getTags -->
28<#--assign
29 article = journalArticleResourceLocalServiceUtil.getArticle(getterUtil.getLong(scopeGroupId), entryId)
30 asset = assetEntryService.getEntry(entryId?number)
31-->
32<#assign
33 tagsList = assetTagServiceUtil.getTags("com.liferay.journal.model.JournalArticle",articleResourcePK)
34/>
35
36<#-- displayDate -->
37<#--assign originalLocale = .locale>
38<#setting locale = localeUtil.getDefault()-->
39<#assign
40 displaydate = displaydate?datetime("EEE, d MMM yyyy HH:mm:ss Z")
41 displaydate = displaydate?string["EEEE, dd. MMMM yyyy"]
42>
43
44<#-- Fuck liferay -->
45<#if locale == "fr_FR">
46 <#assign
47 displaydate = displaydate
48 ?replace(".","")?replace(",","")
49 ?replace("Montag","lundi")
50 ?replace("Dienstag","mardi")
51 ?replace("Mittwoch","mercredi")
52 ?replace("Donnerstag","jeudi")
53 ?replace("Freitag","vendredi")
54 ?replace("Samstag","samedi")
55 ?replace("Sonntag","dimanche")
56 ?replace("Januar","janvier")
57 ?replace("Februar","fevrier")
58 ?replace("März","mars")
59 ?replace("April","avril")
60 ?replace("Mai","mai")
61 ?replace("Juni","juin")
62 ?replace("Juli","julliet")
63 ?replace("August","août")
64 ?replace("September","septembre")
65 ?replace("Oktober","octobre")
66 ?replace("November","novembre")
67 ?replace("Dezember","dimanche")
68 >
69</#if>
70
71<article class="blog-detail mb-4">
72 <#if Bild.getSiblings()[0].getData()?has_content>
73 <#if Bild.getSiblings()?size > 1>
74 <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
75 <ol class="carousel-indicators">
76 <#list Bild.getSiblings() as cur_Bild>
77 <#if cur_Bild.getData()?? && cur_Bild.getData() != "">
78 <li data-target="#carouselExampleIndicators" data-slide-to="${cur_Bild?index}" <#if cur_Bild?is_first>class="active"</#if>></li>
79 </#if>
80 </#list>
81 </ol>
82 <div class="carousel-inner">
83 <#list Bild.getSiblings() as cur_Bild>
84 <#if cur_Bild.getData()?? && cur_Bild.getData() != "">
85 <div class="carousel-item <#if cur_Bild?is_first>active</#if>">
86 <img data-fileentryid="${cur_Bild.getAttribute("fileEntryId")}" src="${cur_Bild.getData()}" class="d-block w-100" alt="${cur_Bild.getAttribute("alt")}" />
87 </div>
88 </#if>
89 </#list>
90 </div>
91 <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
92 <span class="carousel-control-prev-icon" aria-hidden="true"></span>
93 <span class="sr-only">Previous</span>
94 </a>
95 <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
96 <span class="carousel-control-next-icon" aria-hidden="true"></span>
97 <span class="sr-only">Next</span>
98 </a>
99 </div>
100 <#else>
101 <div style="background:url(${Bild.getData()}) center/cover;" class="blogimg"></div>
102 </#if>
103 </#if>
104 <#if VideoURL?? && VideoURL.getData()?has_content>
105 <div class="iframe-container mt-0">
106 <iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/${VideoURL.getData()}/mqdefault.jpg" class="nowrap" width="560"></iframe>
107 </div>
108 </#if>
109
110 <div class="article-body">
111 <header>
112 <ul class="tag-list pl-0">
113 <#list tagsList as tag>
114 <li class="btn-small">${tag.name}</li>
115 </#list>
116 </ul>
117 <h2 class="position-relative nodash mb-3">${entryTitle}</h2>
118 <div class="entryMeta">
119 <#list categoryList as c>
120 ${c.getTitle(locale)},
121 </#list>
122 ${displaydate}
123 </div>
124 </header>
125 <div>
126 <#if Lead?? && Lead.getData()?has_content>
127 <p class="lead">${Lead.getData()}</p>
128 </#if>
129 ${content.getData()}
130 </div>
131 <div class="blogFooter d-md-flex justify-content-between align-items-center mt-5">
132 <#-- Autor [Search Webcontent by Structure (Kontaktperson) and Title] -->
133 <#if AutorIn?? && AutorIn.getData()?has_content>
134 <#assign
135 structures = DMStructureService.getStructures(groupId)
136 structureKey = ""
137 orderbyName = OrderByComparatorFactoryUtil.create("JournalArticle", "displayDate", "desc")
138 isGuestAuthor = true
139 >
140 <#list structures as s>
141 <#if htmlUtil.extractText(s.getName()) = "Kontaktperson">
142 <#assign structureKey = s.structureKey>
143 </#if>
144 </#list>
145 <#assign authors = JournalArticleService.getStructureArticles(groupId,structureKey,-1,-1,orderbyName)>
146
147 <#list authors as author>
148 <#if JournalArticleService.isLatestVersion(groupId,author.articleId,author.version) && author.getTitle() == AutorIn.getData()>
149 <#assign
150 templateKey = author.DDMTemplateKey
151 articleId = author.articleId
152 article_content = JournalArticleLocalService.getArticleContent(groupId, articleId, null, templateKey, localeString, themeDisplay)
153 article = JournalArticleLocalService.getArticle(groupId, articleId)
154 document = saxReaderUtil.read(article.getContentByLocale(locale))
155 rootElement = document.getRootElement()
156 isGuestAuthor = false
157 <#--DLAppService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService")-->
158 >
159 <#list rootElement.elements() as dynamicElement>
160 <#if dynamicElement.attributeValue("name") =="Bild">
161 <#assign
162 authorImg = dynamicElement.element('dynamic-content').getText()?eval
163 authorImgUrl = "/c/document_library/get_file?uuid=" + authorImg.uuid + "&groupId=" + groupId
164 <#--fileEntry = DLAppService.getFileEntryByUuidAndGroupId(authorImg.uuid,groupId)
165 authorImgPath = '/documents/'+groupId+'/'+fileEntry.folderId+'/'+fileEntry.fileName-->
166 >
167 </#if>
168 <#if dynamicElement.attributeValue("name") =="email">
169 <#assign authorEmail = dynamicElement.element('dynamic-content').getText()>
170 </#if>
171 </#list>
172 <div class="author d-flex align-items-center">
173 <div class="authorImg" style="flex:1; max-width:50px;">
174 <div class="aspect-ratio img-circle">
175 <div class="inner" style="background:url(${authorImgUrl}) center/cover"></div>
176 </div>
177 </div>
178 <div class="ml-3">
179 <span class="d-block">
180 <#if locale == "de_DE">
181 Verfasst von: <b>${author.getTitle()}</b>
182 <#else>
183 Rédaction: <b>${author.getTitle()}</b>
184 </#if>
185 </span>
186 <a href="mailto:${authorEmail}" class="mail">${authorEmail}</a>
187 </div>
188 </div>
189 <#break>
190 </#if>
191 </#list>
192 <#if isGuestAuthor>
193 <div class="author d-flex align-items-center">
194 <span class="d-block">Verfasst von: <b>${AutorIn.getData()}</b> </span>
195 </div>
196 </#if>
197 </#if>
198 </div>
199 </div>
200</article>
201
202<#assign
203 groupIds = [groupId]
204 orderbyId = OrderByComparatorFactoryUtil.create("JournalArticle", "orderbyId", "desc")
205 className = ClassNameLocalServiceUtil.getClassName("com.liferay.portlet.journal.model.JournalArticle")
206 classNameId = className.getClassNameId()
207 structures = DMStructureService.getStructures(groupId)
208 orderbyDate = OrderByComparatorFactoryUtil.create("JournalArticle", "displayDate", "desc")
209 prevArticleTitle = ''
210 prevArticleURL = ''
211 nextArticleTitle = ''
212 nextArticleURL = ''
213>
214<#list structures as s>
215 <#if htmlUtil.extractText(s.getName()) = "Blogbeitrag">
216 <#assign structureKey = s.structureKey>
217 </#if>
218</#list>
219<#assign entries = JournalArticleService.getStructureArticles(groupId,structureKey,-1,-1,orderbyDate)>
220
221<#-- Liferay 7.3
222<#list entries?filter(x -> JournalArticleService.isLatestVersion(groupId,x.articleId,x.version))?filter(x -> x.status == 0) as curEntry>
223https://confluence.begasoft.ch/pages/viewpage.action?pageId=5249320
224-->
225
226<#assign entriesIndexArr = []>
227<#list entries as c>
228 <#if c.status == 0 && JournalArticleService.isLatestVersion(groupId,c.articleId,c.version,0)>
229 <#assign entriesIndexArr = entriesIndexArr + [c?index]>
230 </#if>
231</#list>
232
233<#list entries as curEntry>
234 <#if curEntry.status == 0 && JournalArticleService.isLatestVersion(groupId,curEntry.articleId,curEntry.version,0)>
235 <#assign
236 viewUrlCurrent = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()
237 viewUrlRoot = viewUrlCurrent?keep_before('/-/') + '/-/'
238 viewUrl = viewUrlRoot+curEntry.urlTitle
239 >
240 <#-- viewUrlRoot can contain /blog/ if article is edited and saved -->
241
242 <#if curEntry.articleId == entryId>
243 <#assign
244 curIndex = curEntry?index
245 prevIndex = ''
246 nextIndex = ''
247 >
248 <#list entriesIndexArr as e>
249 <#if e == curEntry?index>
250 <#if e?is_first>
251 <#assign nextIndex = entriesIndexArr[e?index + 1]>
252 <#elseif e?is_last>
253 <#assign prevIndex = entriesIndexArr[e?index - 1]>
254 <#else>
255 <#assign
256 prevIndex = entriesIndexArr[e?index - 1]
257 nextIndex = entriesIndexArr[e?index + 1]
258 >
259 </#if>
260 <#break>
261 </#if>
262 </#list>
263
264 <#-- Set Prev -->
265 <#if !curEntry?is_first && prevIndex?has_content>
266 <#if curEntry.status == 0 && JournalArticleService.isLatestVersion(groupId,curEntry.articleId,curEntry.version,0)>
267 <#assign
268 prevArticleTitle = entries[prevIndex?number].getTitle(locale)
269 prevArticleURL = entries[prevIndex?number].urlTitle
270 prevArticleURL = viewUrlRoot?replace('/blog/','/') + prevArticleURL
271 >
272 </#if>
273 <#--assign
274 prevArticleTitle = entries?filter(x -> JournalArticleService.isLatestVersion(groupId,x.articleId,x.version))?filter(x -> x.status == 0)[prevIndex?number].getTitle(locale)
275 prevArticleURL = entries?filter(x -> JournalArticleService.isLatestVersion(groupId,x.articleId,x.version))?filter(x -> x.status == 0)[prevIndex?number].urlTitle
276 prevArticleURL = viewUrlRoot?replace('/blog/','/') + prevArticleURL
277 -->
278 </#if>
279 <#-- Set Next -->
280 <#if !curEntry?is_last && nextIndex?has_content>
281 <#if curEntry.status == 0 && JournalArticleService.isLatestVersion(groupId,curEntry.articleId,curEntry.version,0)>
282 <#assign
283 nextArticleTitle = entries[nextIndex?number].getTitle(locale)
284 nextArticleURL = entries[nextIndex?number].urlTitle
285 nextArticleURL = viewUrlRoot?replace('/blog/','/') + nextArticleURL
286 >
287 </#if>
288 <#--assign
289 nextArticleTitle = entries?filter(x -> JournalArticleService.isLatestVersion(groupId,x.articleId,x.version))?filter(x -> x.status == 0)[nextIndex?number].getTitle(locale)
290 nextArticleURL = entries?filter(x -> JournalArticleService.isLatestVersion(groupId,x.articleId,x.version))?filter(x -> x.status == 0)[nextIndex?number].urlTitle
291 nextArticleURL = viewUrlRoot?replace('/blog/','/') + nextArticleURL
292 -->
293 </#if>
294
295 <div class="blog-pagination row justify-content-between">
296 <#if prevArticleTitle != ''>
297 <div class="prev col-12 col-sm-6 col-md-5 col-lg-4 mb-3 mb-sm-0">
298 <div class="position-relative bg-white p-3 py-lg-4 px-lg-5 h-100 d-flex flex-column">
299 <small class="color-grey">
300 <#if locale == "de_DE">Vorheriger Beitrag<#else>Article précédent</#if>
301 </small>
302 <h4 class="mt-2 mb-3">${stringUtil.shorten(prevArticleTitle, 50)}</h4>
303 <a class="mt-auto stretched-link internal" href="${prevArticleURL}">
304 <#if locale == "de_DE">Mehr erfahren<#else>Pour en savoir plus</#if>
305 </a>
306 </div>
307 </div>
308 </#if>
309 <#if nextArticleTitle != ''>
310 <div class="next col-12 col-sm-6 col-md-5 col-lg-4 justify-self-end ml-auto">
311 <div class="position-relative bg-white p-3 py-lg-4 px-lg-5 h-100 d-flex flex-column">
312 <small class="color-grey">
313 <#if locale == "de_DE">Nächster Beitrag<#else>Prochain article</#if>
314 </small>
315 <h4 class="mt-2 mb-3">${stringUtil.shorten(nextArticleTitle, 50)}</h4>
316 <a class="mt-auto stretched-link internal" href="${nextArticleURL}">
317 <#if locale == "de_DE">Mehr erfahren<#else>Pour en savoir plus</#if>
318 </a>
319 </div>
320 </div>
321 </#if>
322 </div>
323 </#if>
324 </#if>
325</#list>
326
327
328
329<@liferay_theme["defineObjects"] />
330<#assign
331 liferay_theme = PortletJspTagLibs["/META-INF/liferay-theme.tld"]
332 portletNamespace = themeDisplay.getPortletDisplay().getId()
333 portletID = "#p_p_id_"+portletNamespace+"_"
334/>
335
336<style>
337#main-content .portlet-boundary:not(${portletID}):not(.portlet-nested-portlets){
338 display:none;
339}
340
341#main-content .portlet-boundary:not(${portletID}){
342 margin-top:50px;
343}
344
345#layout-column_column-1 .portlet-nested-portlets:hover .portlet-dropzone{
346 padding:0 !important;
347}
348
349#layout-column_column-1 .portlet-nested-portlets .portlet:hover .portlet-topper,
350#layout-column_column-1 .portlet-nested-portlets .portlet.open .portlet-topper{
351 display:none !important;
352}
353
354#layout-column_column-1 .portlet-nested-portlets .portlet:hover .portlet-content,
355#layout-column_column-1 .portlet-nested-portlets .portlet.open .portlet-content{
356 outline:none !important;
357}
358</style>
359
360<script>
361AUI().ready(function() {
362 $('.taglib-social-bookmarks').prependTo('.blogFooter').addClass('order-md-2 mb-5 mb-md-0');
363});
364</script>