Došlo je do pogreške prilikom obrade predloška.
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 135, column 1] ----
1<style>
2 .press-release-title {
3 font-weight: bold;
4 font-size: 40px;
5 padding-bottom: 16px;
6 padding-top: 40px;
7 line-height: 1.1em;
8 }
9
10 .press-release-summary {
11 font-weight: bold;
12 font-size: 24px;
13 padding-bottom: 48px;
14 }
15
16 .press-release-image{
17 padding-bottom: 48px;
18 }
19
20 .press-release-date{
21 padding-bottom: 48px;
22 }
23
24 .press-release-body{
25 padding-bottom: 80px;
26 }
27
28 .press-release-video iframe{
29 padding-bottom: 80px;
30 }
31 article.b-press-release p{
32 color: #000;
33 }
34</style>
35
36<article class="container b-press-release">
37
38 <#if isNotEmptyElement(displayTitle)>
39 <div class="row">
40 <div class="col-xs-12">
41 <header class="row">
42 <h1 class="press-release-title">${displayTitle.getData()}</h1>
43 </header>
44 </div>
45 </div>
46 </#if>
47
48 <#if isNotEmptyElement(creationDate)>
49 <div class="row">
50 <div class="col-xs-4">
51 <div class="press-release-date">${getCurrentContentFormateDate(creationDate)}</div>
52 </div>
53 </div>
54 </#if>
55
56 <#if isNotEmptyElement(summary)>
57 <div class="row">
58 <div class="col-xs-12">
59 <div class="press-release-summary">${summary.getData()}</div>
60 </div>
61 </div>
62 </#if>
63
64 <#if isNotEmptyElement(imageBanner)>
65 <div class="row">
66 <div class="col-xs-12">
67 <div class="press-release-image"><img src="${imageBanner.getData()}" alt="${imageBanner.getAttribute("alt")}"></div>
68 </div>
69 </div>
70 </#if>
71
72 <hr>
73
74 <#if isNotEmptyElement(body)>
75 <div class="row">
76 <div class="col-xs-12">
77 <div class="press-release-body">${body.getData()}</div>
78 </div>
79 </div>
80 </#if>
81
82 <#if isNotEmptyElement(video)>
83 <div class="row">
84 <div class="col-xs-12">
85 <div class="press-release-video embed-responsive embed-responsive-16by9">
86 <iframe frameborder="0" allowfullscreen class="embed-responsive-item" src="${video.getData()}"></iframe>
87 </div>
88 </div>
89 </div>
90 </#if>
91
92</article>
93
94
95
96<#function isNotEmptyElement element>
97 <#return element?? && element.getData()?? && element.getData()!="" && element.getData()?trim != "">
98</#function>
99
100<#function getCurrentContentFormateDate date>
101 <#assign date_Data = getterUtil.getString(date.getData()) />
102
103 <#if validator.isNotNull(date_Data)>
104 <#assign date_DateObj = dateUtil.parseDate("yyyy-mm-dd", date_Data, locale) />
105 <#assign sReturn = dateUtil.getDate(date_DateObj, "dd.mm.yyyy.", locale) />
106 </#if>
107 <#return sReturn>
108</#function>
109
110<#-- content group category -->
111<#assign groupId=themeDisplay.getScopeGroupId() ?number>
112<#assign assetVocabularyLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") />
113<#assign categoryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
114<#assign portletLocalService=serviceLocator.findService("com.liferay.portal.kernel.service.PortletPreferencesLocalService") />
115<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
116<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
117
118<#assign urlTitle = themeDisplay.getURLCurrent()/>
119<#assign beginIndex = themeDisplay.getURLCurrent()?last_index_of("/")+1 />
120<#assign endIndex = urlTitle?index_of("?fbclid")-1/>
121<!-- Removes facebook tracking code that is added when a PR is open from a link on facebook's website -->
122<#if endIndex gt -1>
123 <#assign urlTitle = urlTitle[beginIndex..endIndex]/>
124<#else>
125 <#assign urlTitle=themeDisplay.getURLCurrent()?substring(themeDisplay.getURLCurrent()?last_index_of("/")+1) />
126</#if>
127
128<#assign parentVocabularyName="Content Groups (GA4)">
129<#assign parentVocabulary= assetVocabularyLocalService.getGroupVocabulary(groupId,parentVocabularyName) />
130<#assign childCategories=categoryLocalService.getVocabularyCategories(parentVocabulary.getVocabularyId(),-1,-1,null)>
131
132<#assign finalCategories="" />
133<#assign articleCategories=[]>
134
135<#assign journalArticle=journalArticleLocalService.getArticleByUrlTitle(groupId,urlTitle) >
136<#assign assetEntry=assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",journalArticle.getResourcePrimKey()) />
137<#assign articleCategories=assetEntry.getCategories() />
138
139<#list childCategories as category>
140 <#list articleCategories as articleCategory>
141 <#if category.getName() == articleCategory.getName()>
142 <#if finalCategories?has_content>
143 <#assign finalCategories = finalCategories + ", "+(articleCategory.getName()) />
144 <#else>
145 <#assign finalCategories=articleCategory.getName() >
146 </#if>
147
148 </#if>
149 </#list>
150</#list>
151
152<script>
153 var contentGroupElement = $("#content_group");
154
155 if(location.pathname.includes("/-/")) {
156 if(contentGroupElement.length !== 0) contentGroupElement.val("");
157 }
158
159 if("${finalCategories}" !== ""){
160 var elementValue = "${finalCategories}"
161 if(contentGroupElement.length === 0) $("body").append('<input type="hidden" id="content_group" name="content_group" value="'+elementValue+'">')
162 else contentGroupElement.val(elementValue)
163 }
164</script>
165<#-- End content group category -->