Při zpracování šablony došlo k chybě.
Java method "com.sun.proxy.$Proxy494.getArticleByUrlTitle(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy494 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@a3ab07d"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign journalArticle = journalArtic... [in template "20116#20152#169420" at line 326, column 1] ----
1<style>
2
3 .press-release-title {
4 font-weight: bold;
5 font-size: 40px;
6 padding-bottom: 16px;
7 padding-top: 40px;
8 line-height: 1.1em;
9 }
10
11 .press-release-summary {
12 font-weight: bold;
13 font-size: 24px;
14 padding-bottom: 48px;
15 }
16
17 .press-release-image {
18 padding-bottom: 24px;
19 }
20 .press-release-image-desc{
21 text-align:center;
22 padding:0;
23 }
24
25 .container.b-press-release h2{
26 padding: 0 0 10px 0;
27 }
28
29 .press-release-date {
30 padding-bottom: 48px;
31 }
32
33 .press-release-body {
34 padding-bottom: 40px;
35 }
36
37 .press-release-disclaimer p {
38 font-size: 70%;
39 margin-bottom: 88px;
40 }
41
42 .press-release-disclaimer-separator {
43 text-align: center;
44 margin-bottom: 64px;
45 }
46
47 .press-release-video iframe {
48 padding-bottom: 80px;
49 }
50
51 article.b-press-release p {
52 color: #000;
53 }
54
55 .b-listing h2 {
56 /* font-size: 40px; */
57 font-weight: bold;
58 line-height: 1.5;
59 }
60
61 .b-listing p,
62 strong {
63 font-size: 16px;
64 line-height: 1.5;
65 }
66
67 .b-listing--list-item h3 {
68 padding-bottom: 10px;
69 }
70
71
72
73 .b-listing--list-item {
74 margin-top: 30px;
75 padding-top: 30px;
76 border-top: solid 2px #48647c;
77 }
78
79 .b-listing--list-item--images {
80 margin: 30px 0;
81 width: 100%;
82 }
83
84 .b-listing--list-item--images img {
85 width: 100%;
86 }
87 .image-desc{
88 font-style: italic;
89 font-size: 15px;
90 text-align: center;
91 }
92
93 .owl-buttons {
94 position: absolute;
95 top: 48%;
96 width: 100%;
97 }
98
99 .owl-theme .owl-controls {
100 margin-top: 0;
101 }
102
103 .owl-theme .owl-controls .owl-buttons div {
104 opacity: 1;
105 background-color: #9b9b9b;
106 zoom: 0;
107 font-size: 18px;
108 font-weight: bolder;
109 position: absolute;
110 line-height: 1;
111 }
112
113 .owl-controls .owl-buttons .owl-prev {
114 left: -30px;
115 padding: 2px 8px 2px 6px !important;
116 }
117
118 .owl-controls .owl-buttons .owl-next {
119 right: -30px;
120 padding: 2px 6px 2px 8px !important;
121 }
122
123 @media (max-width: 767px) {
124 .owl-controls .owl-buttons .owl-prev {
125 left: -15px;
126 }
127
128 .owl-controls .owl-buttons .owl-next {
129 right: -15px;
130 }
131 }
132</style>
133
134<article class="container b-press-release">
135<script type="application/ld+json">
136{
137 "@context": "https://schema.org",
138 "@type": "NewsArticle",
139 "headline": "${displayTitle.getData()}",
140 "image": "${imageBanner.getData()}",
141 "author": {
142 "@type": "Organization",
143 "name": "CEMEX CZ"
144 },
145 "publisher": {
146 "@type": "Organization",
147 "name": "cemex.cz",
148 "logo": {
149 "@type": "ImageObject",
150 "url": "https://liferayprod.cemex.com/image/layout_set_logo?img_id=47005475&t=1580296797203"
151 }
152 },
153 "datePublished": "${creationDate.getData()}"
154}
155</script>
156 <#if isNotEmptyElement(displayTitle)>
157 <div class="row">
158 <div class="col-xs-12">
159 <header class="row">
160 <h1 class="press-release-title">${displayTitle.getData()}</h1>
161 </header>
162 </div>
163 </div>
164 </#if>
165
166 <#if isNotEmptyElement(creationDate)>
167 <div class="row">
168 <div class="col-xs-4">
169 <div class="press-release-date">${getCurrentContentFormateDate(creationDate)}</div>
170 </div>
171 </div>
172 </#if>
173
174 <#if summary?? && summary.getSiblings()?has_content && (summary.getSiblings()?size > 0) >
175 <div class="row">
176 <div class="col-xs-12">
177 <div class="press-release-summary">
178 <#if (summary.getSiblings()?size == 1)>
179 ${summary.getSiblings()[0].getData()}
180 <#else>
181 <ul>
182 <#list summary.getSiblings() as curSummary>
183 <li>${curSummary.getData()}</li>
184 </#list>
185 </ul>
186 </#if>
187 </div>
188 </div>
189 </div>
190 </#if>
191
192 <#if isNotEmptyElement(imageBanner)>
193 <div class="row">
194 <div class="col-xs-12">
195 <div class="press-release-image"><img src="${imageBanner.getData()}" alt=""></div>
196 <p class="press-release-image-desc">${imageBanner.getAttribute("alt")}</p>
197 </div>
198 </div>
199 </#if>
200
201 <hr>
202
203 <#if isNotEmptyElement(body)>
204 <div class="row">
205 <div class="col-xs-12">
206 <div class="press-release-body">${body.getData()}</div>
207 </div>
208 </div>
209 </#if>
210
211
212
213 <#if disclaimer?? && disclaimer.getData() != "" >
214 <div class="press-release-disclaimer-separator"><hr></div>
215
216 <div class="row">
217 <div class="col-xs-12">
218 <div class="press-release-disclaimer">${disclaimer.getData()}</div>
219 </div>
220 </div>
221 </#if>
222
223 <#if isNotEmptyElement(video)>
224 <div class="row">
225 <div class="col-xs-12">
226 <div class="press-release-video embed-responsive embed-responsive-16by9">
227 <iframe frameborder="0" allowfullscreen class="embed-responsive-item"
228 src="${video.getData()}"></iframe>
229 </div>
230 </div>
231 </div>
232 </#if>
233
234 <#assign entryDescription=.vars['reserved-article-description'].data>
235
236 <#if listItem.getSiblings()?has_content>
237 <#list listItem.getSiblings() as currentListItem>
238 <#assign itemImage=currentListItem.getChild("listItemImage")!"">
239 <#assign itemImageDescription=currentListItem.getChild("listItemImage").getAttribute("alt")!"">
240 <#if itemImage.getSiblings()?has_content && itemImage.getSiblings()?size gt 1>
241 <div class="b-listing--list-item--images b-listing--list-item--carousel">
242 <#list itemImage.getSiblings() as currentListItemImage>
243
244 <#if currentListItemImage.getAttribute("alt")?? && currentListItemImage.getAttribute("alt") !="">
245 <#assign imageAlt=currentListItemImage.getAttribute("alt") />
246 <#else>
247 <#assign imageAlt="" />
248 </#if>
249 <img alt="${imageAlt}" class="lazyOwl" data-src="${currentListItemImage.getData()}">
250
251 </#list>
252 </div>
253 <#else>
254 <#if itemImage.getAttribute("alt")?? && itemImage.getAttribute("alt") !="">
255 <#assign imageAlt=itemImage.getAttribute("alt") />
256 <#else>
257 <#assign imageAlt="" />
258 </#if>
259 <#if itemImage.getData()?has_content>
260 <div class="b-listing--list-item--images">
261 <p class="image-desc">${itemImageDescription}</p>
262 <img src="${itemImage.getData()}" alt="${itemImageDescription}">
263 </div>
264 </#if>
265 </#if>
266 </#list>
267 </#if>
268
269 <script>
270 $(document).ready(function () {
271 $(".b-listing--list-item--carousel").owlCarousel({
272 items: 1,
273 lazyLoad: true,
274 navigation: true,
275 navigationText: ['❮', "❯"],
276 pagination: false,
277 singleItem: true
278 });
279
280 });
281 </script>
282</article>
283
284
285
286
287<#function isNotEmptyElement element>
288 <#return element?? && element.getData()?? && element.getData()!="" && element.getData()?trim !="">
289</#function>
290
291<#function getCurrentContentFormateDate date>
292 <#assign date_Data=getterUtil.getString(date.getData()) />
293
294 <#if validator.isNotNull(date_Data)>
295 <#assign date_DateObj=dateUtil.parseDate("yyyy-MM-dd", date_Data, locale) />
296 <#assign sReturn=dateUtil.getDate(date_DateObj, "dd. MMMM, yyyy" , locale) />
297 </#if>
298 <#return sReturn>
299</#function>
300
301<#-- content group category -->
302<#assign groupId=themeDisplay.getScopeGroupId() ?number>
303<#assign assetVocabularyLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") />
304<#assign categoryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
305<#assign portletLocalService=serviceLocator.findService("com.liferay.portal.kernel.service.PortletPreferencesLocalService") />
306<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
307<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
308
309<#assign urlTitle = themeDisplay.getURLCurrent()/>
310<#assign beginIndex = themeDisplay.getURLCurrent()?last_index_of("/")+1 />
311<#assign endIndex = urlTitle?index_of("?fbclid")-1/>
312<!-- Removes facebook tracking code that is added when a PR is open from a link on facebook's website -->
313<#if endIndex gt -1>
314 <#assign urlTitle = urlTitle[beginIndex..endIndex]/>
315<#else>
316 <#assign urlTitle=themeDisplay.getURLCurrent()?substring(themeDisplay.getURLCurrent()?last_index_of("/")+1) />
317</#if>
318
319<#assign parentVocabularyName="Content Groups (GA4)">
320<#assign parentVocabulary= assetVocabularyLocalService.getGroupVocabulary(groupId,parentVocabularyName) />
321<#assign childCategories=categoryLocalService.getVocabularyCategories(parentVocabulary.getVocabularyId(),-1,-1,null)>
322
323<#assign finalCategories="" />
324<#assign articleCategories=[]>
325
326<#assign journalArticle=journalArticleLocalService.getArticleByUrlTitle(groupId,urlTitle) >
327<#assign assetEntry=assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",journalArticle.getResourcePrimKey()) />
328<#assign articleCategories=assetEntry.getCategories() />
329
330<#list childCategories as category>
331 <#list articleCategories as articleCategory>
332 <#if category.getName() == articleCategory.getName()>
333 <#if finalCategories?has_content>
334 <#assign finalCategories = finalCategories + ", "+(articleCategory.getName()) />
335 <#else>
336 <#assign finalCategories=articleCategory.getName() >
337 </#if>
338
339 </#if>
340 </#list>
341</#list>
342
343<script>
344 var contentGroupElement = $("#content_group");
345
346 if(location.pathname.includes("/-/")) {
347 if(contentGroupElement.length !== 0) contentGroupElement.val("");
348 }
349
350 if("${finalCategories}" !== ""){
351 var elementValue = "${finalCategories}"
352 if(contentGroupElement.length === 0) $("body").append('<input type="hidden" id="content_group" name="content_group" value="'+elementValue+'">')
353 else contentGroupElement.val(elementValue)
354 }
355</script>
356<#-- End content group category -->