Keer terug

Nog geen inspiratie voor de vakantie? Huur een camper met Goboony!

Er trad een fout op tijdens de verwerking van de sjabloon.
No compatible overloaded variation was found; wrong number of arguments.
The FTL type of the argument values were: extended_hash+string (com.liferay.journal.model.impl.JournalArticleImpl wrapped into f.e.b.StringModel), string (wrapper: f.t.SimpleScalar), string (wrapper: f.t.SimpleScalar), string (wrapper: f.t.SimpleScalar), extended_hash+string (com.liferay.portal.kernel.theme.ThemeDisplay wrapped into f.e.b.StringModel).
The matching overload was searched among these members:
    com.sun.proxy.$Proxy1051.getArticleContent(com.liferay.journal.model.JournalArticle, String, String, String, com.liferay.portal.kernel.portlet.PortletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay),
    com.sun.proxy.$Proxy1051.getArticleContent(long, String, double, String, String, String, com.liferay.portal.kernel.portlet.PortletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay),
    com.sun.proxy.$Proxy1051.getArticleContent(long, String, String, String, String, com.liferay.portal.kernel.portlet.PortletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay)

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign footerContent = journalServic...  [in template "20097#20123#3293819" at line 72, column 17]
----
1<#assign groupService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") /> 
2<#assign journalArticleResourceService = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService") /> 
3 
4<#assign reservedArticleAuthorName = .vars['reserved-article-author-name'] /> 
5<#assign reservedArticleTitle = .vars['reserved-article-title'] /> 
6<#assign reservedArticleId = .vars['reserved-article-id'] /> 
7<#assign reservedArticleDescr = .vars['reserved-article-description'] /> 
8<#assign reservedArticleDate = .vars['reserved-article-display-date'] /> 
9<#assign groupIdLong = getterUtil.getLong(groupId) /> 
10<#assign articleResourcePK = journalArticleResourceService.getArticleResourcePrimKey(groupIdLong, reservedArticleId.data) /> 
11 
12<#assign journalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
13<#assign article = journalService.getArticle(groupId, reservedArticleId.data) /> 
14 
15<#assign groupUrl = groupService.getGroup(groupId).friendlyURL /> 
16<#assign link = "/nl/web${groupUrl}/-/${article.urlTitle}" /> 
17 
18<#assign catLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
19<#assign articleNames = catLocalService.getCategoryNames("com.liferay.journal.model.JournalArticle", articleResourcePK) /> 
20<#assign categories = catLocalService.getCategories("com.liferay.journal.model.JournalArticle", articleResourcePK) /> 
21 
22<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() /> 
23<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
24 
25<#-- nice guide for handling dates on Freemarker: https://gsmblog.net/date-objects-liferay-freemarker-web-content-templates/ --> 
26<#assign defaultDateFormat = "EEE, d MMM yyyy HH:mm:ss Z" /> 
27 
28<#-- Save the original page locale for later --> 
29<#assign originalLocale = .locale> 
30 
31<#-- Set the page locale to the portals default locale --> 
32<#setting locale = localeUtil.getDefault()> 
33 
34<#-- Parse the date to a date object --> 
35<#assign date = reservedArticleDate.data?datetime(defaultDateFormat)> 
36 
37<#-- Set the page locale back to the original page locale --> 
38<#setting locale = themeDisplay.getLocale()> 
39<#-- nice guide for handling dates on Freemarker: https://gsmblog.net/date-objects-liferay-freemarker-web-content-templates/ --> 
40 
41<style> 
42div.h2 { 
43    display: none; 
44
45</style> 
46<div class="detail"> 
47    <div class="heading"> 
48		<div> 
49    	    <p class="article-info">${date?string["d MMMM yyyy"]}</p> 
50    	</div> 
51    	 
52    </div> 
53    <div class="sharethis-inline-share-buttons"></div> 
54    <div class="content" style="margin-top:20px !important;margin-bottom:20px !important;"> 
55		<#if (blogimagefield.getData())?? && blogimagefield.getData() != ""> 
56		<div class="comment-overlay"> 
57			<img loading="lazy" class="comment-overlay__img" alt="Image of the blog article" data-fileentryid="${blogimagefield.getAttribute("fileEntryId")}" src="${blogimagefield.getData()}" /> 
58			<i class="icon-picto-comment comment-overlay__icon"></i> 
59		</div> 
60		</#if> 
61		 
62    	<p class="detail"> 
63	    	${blogdetailfield.data} 
64    	</p> 
65    	 
66    	<div class="footerArticle"> 
67    	    <#assign footerContent = "<!-- footer article goes here -->" /> 
68            <#if footerArticle?? && footerArticle.getData()?has_content> 
69                <#assign cur_webContentFooter = footerArticle.getData()?eval /> 
70                <#assign cur_webContentFooter_classPK = cur_webContentFooter.classPK /> 
71                <#assign article = journalService.getLatestArticle(cur_webContentFooter_classPK?number) /> 
72                <#assign footerContent = journalService.getArticleContent(article, article.getDDMTemplateKey(), "VIEW", themeDisplay.getLanguageId(), themeDisplay) /> 
73            </#if> 
74            ${footerContent} 
75    	</div> 
76    	 
77    	<div class="sharethis-inline-share-buttons"></div> 
78    </div> 
79</div> 
80 
81<script>	  
82	 $(document).ready(function() {		 
83		const titleElement = document.querySelector("span.asset-title.d-inline"); 
84		const title = titleElement ? titleElement.innerHTML.trim() : ""; 
85		const domain = "${themeDisplay.getPortalURL()}"; 
86		 
87		const hiddenDateElement = document.querySelector(".dateld"); 
88		const hiddenDate = hiddenDateElement ? hiddenDateElement.innerText.trim() : ""; 
89 
90		const imgElement = document.querySelector(".comment-overlay img"); 
91		const imgUrl = imgElement ? imgElement.getAttribute("src") : ""; 
92		 
93		const schema = { 
94			"@context": "https://schema.org", 
95			"@type": "Article", 
96			"headline": title, 
97			"image": domain + imgUrl, 
98			"datePublished": hiddenDate 
99		}; 
100	 
101		const scriptTag = document.createElement("script"); 
102		scriptTag.type = "application/ld+json"; 
103		scriptTag.textContent = JSON.stringify(schema); 
104		document.head.appendChild(scriptTag); 
105	}); 
106	 
107(function() { 
108  $("ol.breadcrumb li:nth-child(3)").css("display","none"); 
109  const MAX_LEN = 45; 
110  let newTitle = document.title; 
111	let ogtitle = document.title; 
112 
113  newTitle = newTitle.trim(); 
114  if (newTitle.length > MAX_LEN) { 
115    newTitle = newTitle.substring(0, MAX_LEN - 1).trim() + "…"; 
116
117	 
118  document.title = "Blog " + newTitle + "- Vivium"; 
119	 
120  const metas = [ 
121    { selector: 'meta[property="og:title"]', attr: 'property', value: 'og:title' } 
122  ]; 
123 
124  metas.forEach(meta => { 
125    let el = document.querySelector(meta.selector); 
126    if (!el) { 
127      el = document.createElement('meta'); 
128      el.setAttribute(meta.attr, meta.value); 
129      document.head.appendChild(el); 
130
131    el.setAttribute('content', ogtitle); 
132  }); 
133})(); 
134</script> 

Meest gelezen