Si è verificato un errore nell'elaborarazione del modello.
Can't convert this string to number: "118020?uageId=en_US"
The blamed expression:
==> request.getParameter("p_r_p_categoryId")?number  [in template "74789#74824#117965" at line 51, column 61]

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${catsService.fetchCategory(request.g...  [in template "74789#74824#117965" at line 51, column 33]
----
1<#-- CDN Host --> 
2<#assign cdnUrl = themeDisplay.getCDNDynamicResourcesHost()> 
3 
4<#assign  
5    vocabolarioBlog = 118019 
6    vocabolarioDate = 118123 
7    tagsService = utilLocator.findUtil("com.liferay.asset.kernel.service.AssetTagLocalService") 
8    catsService = utilLocator.findUtil("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
9    DLAppLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLAppLocalServiceUtil"] 
10    mkspAPI = serviceLocator.findService("eu.suggesto.suggestogui.service.SuggestoGuiLocalService") 
11     
12    leggi_tutto = mkspAPI.msg(companyId, groupId, "leggi_tutto", locale, "it", locale) 
13    categorie = mkspAPI.msg(companyId, groupId, "categorie", locale, "it", locale) 
14    archivi = mkspAPI.msg(companyId, groupId, "archivi", locale, "it", locale) 
15    post_popolari = mkspAPI.msg(companyId, groupId, "post_popolari", locale, "it", locale) 
16    contenuti_tag = mkspAPI.msg(companyId, groupId, "contenuti_tag", locale, "it", locale) 
17    contenuti_cat = mkspAPI.msg(companyId, groupId, "contenuti_cat", locale, "it", locale) 
18    nessun_contenuto = mkspAPI.msg(companyId, groupId, "nessun_contenuto", locale, "it", locale) 
19     
20    currentPageUrl = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()?keep_before("?") 
21     
22    tags = "/o/d40/img" 
23    size = "/w_1000/" 
24    sideSize = "/w_500/" 
25    siteUrl = themeDisplay.getPortalURL()?replace("://", ".") 
26    prefix = cdnUrl + tags + size + siteUrl 
27    sidePrefix = cdnUrl + tags + sideSize + siteUrl 
28/> 
29 
30<div class="container-fluid-big bg-body pt-5"> 
31    <div class="row"> 
32        <div class="col-12 col-lg-8 col-xl-7"> <#-- order-2 order-lg-1 --> 
33            <div class="row"> 
34                <#if request.getParameter("p_r_p_tag")?has_content> 
35                    <div class="col-12 mb-5"> 
36                        <h5 class="text-uppercase font-weight-bold text-dark"> 
37                            ${contenuti_tag}:  
38                            <a href="${currentPageUrl}" class="btn btn-outline-primary py-0 mb-1 ml-1"> 
39                                ${request.getParameter("p_r_p_tag")} 
40                                <i class="fa fa-times text-danger ml-2"></i> 
41                            </a> 
42                        </h5> 
43                    </div> 
44                </#if> 
45                 
46                <#if request.getParameter("p_r_p_categoryId")?has_content> 
47                    <div class="col-12 mb-5"> 
48                        <h5 class="text-uppercase font-weight-bold text-dark"> 
49                            ${contenuti_cat}:  
50                            <a href="${currentPageUrl}" class="btn btn-outline-primary py-0 mb-1 ml-1"> 
51                                ${catsService.fetchCategory(request.getParameter("p_r_p_categoryId")?number).getName()} 
52                                <i class="fa fa-times text-danger ml-2"></i> 
53                            </a> 
54                        </h5> 
55                    </div> 
56                </#if> 
57                 
58                <#if entries?has_content> 
59                    <#list entries as entry> 
60                        <#assign 
61                    		entry = entry 
62                    		assetRenderer = entry.getAssetRenderer() 
63                    		className = assetRenderer.getClassName() 
64                    		entryTitle = htmlUtil.escape(assetRenderer.getTitle(themeDisplay.getLocale())) 
65                    	/> 
66                    	 
67                    	<#if className == "com.liferay.journal.model.JournalArticle"> 
68                    	    <#assign 
69                    	        journalArticle = assetRenderer.getArticle() 
70                                document = saxReaderUtil.read(journalArticle.getContent()) 
71                                rootElement = document.getRootElement() 
72                            /> 
73                             
74                            <@getDate entry=entry /> 
75                             
76                            <#assign stringSelector = "dynamic-element[@name='copertina']"> 
77                            <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)>  
78                            <#if xPathSelector.selectSingleNode(rootElement)??> 
79                                <#assign immagine = xPathSelector.selectSingleNode(rootElement).getStringValue()> 
80                                <#assign fileEntryId = assetRenderer.getClassPK()> 
81                                <#assign jsonField = jsonFactoryUtil.createJSONObject(immagine)> 
82                                <#assign fileEntry = DLAppLocalServiceUtil.getFileEntryByUuidAndGroupId(jsonField.uuid, groupId)> 
83                                <#assign immagine = "/documents/" + jsonField.groupId + "/" + fileEntry.folderId + "/" + jsonField.title + "/" + jsonField.uuid> 
84                            </#if> 
85                             
86                            <#assign stringSelector = "dynamic-element[@name='sottotitolo']/dynamic-content[@language-id = '" + themeDisplay.getLocale() + "']"> 
87                            <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 
88                            <#if xPathSelector.selectSingleNode(rootElement)??> 
89                                <#assign sottotitolo = xPathSelector.selectSingleNode(rootElement).getStringValue()> 
90                            <#else> 
91                                <#assign sottotitolo = ""> 
92                            </#if> 
93                             
94                            <#assign stringSelector = "dynamic-element[@name='sottotitolo']/dynamic-element[@name='paragrafo']/dynamic-content[@language-id = '" + themeDisplay.getLocale() + "']"> 
95                            <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 
96                            <#if xPathSelector.selectSingleNode(rootElement)??> 
97                                <#assign paragrafo = xPathSelector.selectSingleNode(rootElement).getStringValue()> 
98                            <#else> 
99                                <#assign paragrafo = ""> 
100                            </#if> 
101                             
102                            <#assign viewUrl = mkspAPI.getArticleUrl(groupId, serverName, journalArticle.articleId, localeUtil.fromLanguageId(themeDisplay.getLocale()), localeUtil.fromLanguageId(themeDisplay.getLocale()), "/dettaglio-blog")> 
103                             
104                    	    <div class="col-12 h-100"> 
105                    	        <a href="${viewUrl}" class="h5 font-weight-bold text-dark text-uppercase pointer">${entryTitle} <span class="d-inline-block"><@getEditIcon /></span></a> 
106                    	        <div class="d-flex flex-row mt-3"> 
107                                    <div class="d-inline-flex mr-2 mr-lg-5"> 
108                                        <i class="fa fa-calendar-alt ico-detail text-muted"></i> 
109                                        <p class="ml-2 ml-lg-3 mb-0">${pubDate}</p> 
110                                    </div> 
111                                    <#if tagsService.getEntryTags(entry.entryId)?has_content> 
112                                        <div class="d-inline-flex mr-2 mr-lg-5"> 
113                                            <i class="fa fa-tag ico-detail text-muted"></i> 
114                                            <div class="ml-2 ml-lg-3"> 
115                                                <#list tagsService.getEntryTags(entry.entryId) as tag> 
116                                                    <#assign tagUrl = renderResponse.createRenderURL()> 
117        		                                    ${tagUrl.setParameter("tag", tag.getName())} 
118        		                                     
119                                                    <a class="text-colored text-capitalize" href="${tagUrl}">${tag.getName()?trim}</a> 
120                                                    <#if !tag?is_last> 
121                                                        ,&nbsp; 
122                                                    </#if> 
123                                                </#list> 
124                                            </div> 
125                                        </div> 
126                                    </#if> 
127                                    <#--div class="d-inline-flex mr-2 mr-lg-5"> 
128                                        <i class="fa fa-eye ico-detail text-muted"></i> 
129                                        <p class="ml-2 ml-lg-3 mb-0">${entry.viewCount}</p> 
130                                    </div--> 
131                                </div> 
132                                <a href="${viewUrl}" title="${entryTitle}"> 
133                                    <img datasrc="${prefix}${immagine}" class="custom-round-top-left blog-cover fit-cover lazy-load w-100 h-100 my-4" alt="${entryTitle}"> 
134                                </a> 
135                                <p>${stringUtil.shorten(htmlUtil.stripHtml(paragrafo), 200)}</p> 
136                                <a href="${viewUrl}" class="text-dark d-flex my-4"> 
137                                    <i class="fa fa-3x fa-arrow-right slim-body mr-3"></i> 
138                                    <h5 class="text-uppercase font-weight-bold my-auto">${leggi_tutto}</h5> 
139                                </a> 
140                            	<#if !entry?is_last> 
141                            	    <hr class="my-5"> 
142                            	</#if> 
143                    	    </div> 
144                        </#if> 
145                    </#list> 
146                <#else> 
147                    <h4 class="slim px-3">${nessun_contenuto}</h4> 
148                </#if> 
149            </div> 
150        </div> 
151        <div class="col-12 col-lg-4 offset-xl-1"> <#-- order-1 order-lg-2 --> 
152            <div class="bg-white p-3"> 
153                <h5 class="font-weight-bold text-center text-uppercase">${categorie}</h5> 
154                <hr class="my-4"> 
155                <ul class="list-unstyled d-flex flex-column mb-5"> 
156                    <#list catsService.getVocabularyCategories(vocabolarioBlog, -1, -1, null) as cat> 
157                        <#assign catUrl = renderResponse.createRenderURL()> 
158        		        ${catUrl.setParameter("categoryId", cat.categoryId?string)} 
159        		        <li class="text-center py-2"> 
160                            <a href="${catUrl}" class="category"> 
161                                ${cat.getName()} 
162                            </a> 
163                        </li> 
164                    </#list> 
165                </ul> 
166                 
167                <#if entries?has_content> 
168                    <h5 class="font-weight-bold text-center text-uppercase">${post_popolari}</h5> 
169                    <hr class="my-4"> 
170                    <div class="mb-5"> 
171                        <#list entries as entry> 
172                            <#if (entry?counter < 3)> 
173                                <#assign 
174                            		entry = entry 
175                            		assetRenderer = entry.getAssetRenderer() 
176                            		className = assetRenderer.getClassName() 
177                            		entryTitle = htmlUtil.escape(assetRenderer.getTitle(themeDisplay.getLocale())) 
178                            	/> 
179                            	 
180                            	<#if className == "com.liferay.journal.model.JournalArticle"> 
181                            	    <#assign 
182                            	        journalArticle = assetRenderer.getArticle() 
183                                        document = saxReaderUtil.read(journalArticle.getContent()) 
184                                        rootElement = document.getRootElement() 
185                                    /> 
186                                     
187                                    <@getDate entry=entry /> 
188                                     
189                                    <#assign stringSelector = "dynamic-element[@name='copertina']"> 
190                                    <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)>  
191                                    <#if xPathSelector.selectSingleNode(rootElement)??> 
192                                        <#assign immagine = xPathSelector.selectSingleNode(rootElement).getStringValue()> 
193                                        <#assign fileEntryId = assetRenderer.getClassPK()> 
194                                        <#assign jsonField = jsonFactoryUtil.createJSONObject(immagine)> 
195                                        <#assign fileEntry = DLAppLocalServiceUtil.getFileEntryByUuidAndGroupId(jsonField.uuid, groupId)> 
196                                        <#assign immagine = "/documents/" + jsonField.groupId + "/" + fileEntry.folderId + "/" + jsonField.title + "/" + jsonField.uuid> 
197                                    </#if> 
198                                     
199                                    <#assign viewUrl = mkspAPI.getArticleUrl(groupId, serverName, journalArticle.articleId, localeUtil.fromLanguageId(themeDisplay.getLocale()), localeUtil.fromLanguageId(themeDisplay.getLocale()), "/dettaglio-blog")> 
200                                     
201                                    <a href="${viewUrl}" class="card border-0 rounded-0"> 
202                                      <img datasrc="${sidePrefix}${immagine}" class="card-img-top fit-cover asset-cover rounded-0 lazy-load" alt="${entryTitle}"> 
203                                      <div class="card-body text-center"> 
204                                        <h6 class="font-weight-bold text-dark">${entryTitle}</h6> 
205                                        <p class="text-muted">${pubDate}</p> 
206                                      </div> 
207                                    </a> 
208                                </#if> 
209                            </#if> 
210                        </#list> 
211                    </div> 
212                </#if> 
213                 
214                <#-- Non utilizzato attualmente 
215                <h5 class="font-weight-bold text-center text-uppercase">${archivi}</h5> 
216                <hr class="my-4"> 
217                <ul class="list-unstyled d-flex flex-column mb-5"> 
218                    <#list catsService.getVocabularyCategories(vocabolarioDate, -1, -1, null) as cat> 
219                        <#assign catUrl = renderResponse.createRenderURL()> 
220        		        ${catUrl.setParameter("categoryId", cat.categoryId?string)} 
221        		        <li class="text-center py-2"> 
222                            <a href="${catUrl}" class="category"> 
223                                ${cat.getName()}&nbsp; 
224                                <span class="text-dark">(${catsService.getAssetEntryAssetCategoriesCount(entry.entryId)})</span> 
225                            </a> 
226                        </li> 
227                    </#list> 
228                </ul> 
229                --> 
230                 
231                <h5 class="font-weight-bold text-center text-uppercase">Tag</h5> 
232                <hr class="my-4"> 
233                <div class="row"> 
234                    <#list tagsService.getGroupTags(groupId) as tag> 
235                        <#assign tagUrl = renderResponse.createRenderURL()> 
236                        ${tagUrl.setParameter("tag", tag.getName())} 
237                        <div class="col-12 col-md-6 mb-3"> 
238                            <a class="btn bg-light btn-block text-dark text-uppercase p-2" href="${tagUrl}">${tag.getName()?trim}</a> 
239                        </div> 
240                    </#list> 
241                </div> 
242            </div> 
243        </div> 
244    </div> 
245</div> 
246 
247<#macro getDate entry> 
248    <#setting locale = themeDisplay.getLocale()> 
249    <#assign pubDate = entry.publishDate?string["dd MMMM, yyyy"]> 
250</#macro> 
251 
252<#macro getEditIcon> 
253	<#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
254		<#assign redirectURL = renderResponse.createRenderURL() /> 
255 
256		${redirectURL.setParameter("mvcPath", "/add_asset_redirect.jsp")} 
257		${redirectURL.setWindowState("pop_up")} 
258 
259		<#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
260 
261		<#if validator.isNotNull(editPortletURL)> 
262			<#assign title = languageUtil.format(themeDisplay.getLocale(), "edit-x", entryTitle, false) /> 
263 
264			<@liferay_ui["icon"] 
265				cssClass="icon-monospaced visible-interaction" 
266				icon="pencil" 
267				markupView="lexicon" 
268				message=title 
269				url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
270			/> 
271		</#if> 
272	</#if> 
273</#macro> 

Ti piacciono

le nostre soluzioni?

Compila il form per avere ulteriori informazioni