La Huída
S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing: ==> recomendationText [in template "10901#10934#RECOMANACIO_DETALL" at line 136, column 27] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${recomendationText.data} [in template "10901#10934#RECOMANACIO_DETALL" at line 136, column 25] ----
1<#assign id = .vars['reserved-article-id'].data>
2<script type="text/javascript">
3
4 function saveEntryAction(formName){
5
6 document.getElementById(formName).articleId.value=${id};
7 document.getElementById(formName).groupId.value=${getterUtil.getLong(groupId)};
8 document.getElementById(formName).submit();
9
10 }
11
12</script>
13
14
15<#assign urltitle = .vars['reserved-article-url-title'].data>
16
17<#assign assetEntrySvc = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
18<#assign articleSvc = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
19<#assign classNameSvc = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService")>
20<#assign geniusGroupId="6200569">
21<#if (scopeGroupId?number != geniusGroupId?number)>
22 <div class="recommendationDetail d-flex flex-column">
23 <div class="recommendationData">
24 <div class="recommendationValoraciones">
25
26 <#assign articleClass = classNameSvc.getClassName("com.liferay.journal.model.JournalArticle")>
27
28 <#assign articleId = id>
29
30 <#assign groupIdLong = getterUtil.getLong(groupId)>
31
32 <#assign article = articleSvc.getArticle(groupIdLong, articleId)>
33
34 <#if (!article?has_content )>
35 <#assign groupSvc = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")>
36 <#assign groupIdLong = getterUtil.getLong(groupSvc.getCompanyGroup(companyId).getGroupId())>
37 <#assign article = articleSvc.getArticle(groupIdLong, articleId)>
38 </#if>
39
40 <#if (article?has_content)>
41
42 <#assign assetEntry = assetEntrySvc.fetchEntry(articleClass.getClassName(), article.getResourcePrimKey())>
43
44 <#assign assetEntryId = assetEntry.getEntryId()>
45 <#assign assetEntryIdLong = getterUtil.getLong(assetEntryId)>
46
47 <#assign assetLinkSvc = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService")>
48
49 <#if (assetLinkSvc?has_content)>
50 <#assign assetLinks = assetLinkSvc.getDirectLinks(assetEntryIdLong)>
51 <#list assetLinks as assetLink>
52
53 <#if (getterUtil.getLong(assetLink.getEntryId1()) == assetEntryIdLong)>
54 <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId2()))>
55 <#else>
56 <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId1()))>
57 </#if>
58
59 <#assign classPK = assetLinkEntry.getClassPK()>
60
61 <#assign relatedArticle = articleSvc.getLatestArticle(getterUtil.getLong(classPK))>
62
63 <#if (relatedArticle?has_content)>
64
65 <#assign relatedStructureId = relatedArticle.DDMStructureKey>
66
67 <#if (relatedStructureId == "DOCUMENT_RECOMANAT" )>
68 <#assign relatedArticleTemplateId = "RECOMANACIÓ_" + relatedStructureId>
69 <#else>
70 <#assign relatedArticleTemplateId = "RECOMANACIÓ_ALTRE">
71 </#if>
72
73 <#assign languageId = localeUtil.toLanguageId(locale)>
74
75 <#if image.getData()?has_content && image.getData()?length != 0>
76 <#assign imgSrc = image.getData()>
77 <#else>
78 <#assign imgSrc = image.urlExterna.getData()>
79 </#if>
80
81 <meta property="og:url" content="${themeDisplay.getPortalURL()}${themeDisplay.getURLCurrent()}"/>
82 <meta property="og:type" content="article" />
83 <meta property="og:description" content="${stringUtil.shorten(htmlUtil.stripHtml(recomendationText.getData()),250)}" />
84 <meta property="og:title" content="${title.getData()}" />
85 <meta property="og:image" content="${imgSrc}" />
86 <meta property="og:image:width" content="200" />
87 <meta property="og:image:height" content="300" />
88 <meta name="twitter:card" content="summary_large_image" />
89 <meta name="twitter:card" content="summary" />
90 <meta name="twitter:title" content="${title.getData()}" />
91 <meta name="twitter:description" content="${stringUtil.shorten(htmlUtil.stripHtml(recomendationText.getData()),250)}" />
92 <meta name="twitter:url" content="${themeDisplay.getPortalURL()}${themeDisplay.getURLCurrent()}"/>
93 <meta name="twitter:image" content="${imgSrc}" />
94
95
96
97 ${journalContentUtil.getContent(groupIdLong,relatedArticle.articleId,relatedArticleTemplateId,viewMode,languageId,themeDisplay)}
98
99
100
101
102 <#else>
103
104 <p style="display:none">No se ha recuperado ningún artículo con el id [${articleConnection.secondaryId}]</p>
105
106 </#if>
107
108
109
110 </#list>
111 </#if>
112
113 <#else>
114
115 <p style="display:none">Problema al recuperar el artículo del grupo [$groupIdLong], con articleId [$articleId]</p>
116
117 </#if>
118
119
120
121 <#assign idUsuario = getterUtil.getLong(themeDisplay.getUserId())>
122 <#if (idUsuario gt 0)>
123 <#assign userService =serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")>
124 <#assign user =userService.getUserById(getterUtil.getLong(themeDisplay.getUserId()))>
125 </#if>
126
127 </div>
128
129
130
131
132 </div>
133
134 <div class="recomanacio_detall">
135
136 ${recomendationText.data}
137
138 </div>
139
140 <#if (article?has_content)>
141 <#assign fechaModified=assetEntry.getModifiedDate()>
142 <span class="modificationDate">${fechaModified?string("dd/MM/yyyy")}</span>
143
144
145 </#if>
146 <div class="valoraciones">
147
148
149 <#assign titolRecomanacio=languageUtil.get(locale, title.getData())>
150 <#if (relatedArticle?has_content)>
151 <#assign titolRecomanacio=languageUtil.get(locale, relatedArticle.title)>
152 </#if>
153 <div class="py-2 a2a_kit a2a_kit_size_32 a2a_default_style" data-a2a-url="https://bibliotecavirtual.diba.cat/detall-recomanacio/-/contingut/${groupId}/${urltitle}" data-a2a-title="${title.getData()}" style="background-color: #e6e6e6;display: inline-block;" data-a2a-icon-color="#e6e6e6,#000000">
154 <!-- AddToAny BEGIN -->
155 <div class="a2a_kit a2a_kit_size_32 a2a_default_style">
156 <a class="a2a_dd" href="https://www.addtoany.com/share"></a>
157 <a class="a2a_button_email"></a>
158 <a class="a2a_button_print"></a>
159 </div>
160
161<script>
162var a2a_config = a2a_config || {};
163a2a_config.onclick = false;
164a2a_config.locale = "es";
165
166</script>
167
168<script async src="https://static.addtoany.com/menu/page.js"></script>
169
170
171 <#if (validator.isNotNull(user) && !user.isDefaultUser())>
172 <form name="fmGuardarRecomendacion${id}" action="" method="post">
173 <input type="button" class="botoDesar" name="save" value="Desa" onclick="javascript:saveEntryAction("fmGuardarRecomendacion${id}");"/>
174 </form>
175 </#if>
176
177 </div>
178
179 </div>
180
181<#else>
182
183 <div class="recommendationDetail">
184
185 <div class="recommendationData">
186
187 <div class="recommendationValoraciones">
188
189
190
191
192
193
194
195
196
197
198
199 <#assign articleClass = classNameSvc.getClassName("com.liferay.journal.model.JournalArticle")>
200
201 <#assign articleId = id>
202
203 <#assign groupIdLong = getterUtil.getLong(groupId)>
204
205 <#assign article = articleSvc.getArticle(groupIdLong, articleId)>
206
207
208 <#if ( !article?has_content )>
209 <#assign groupSvc = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")>
210 <#assign groupIdLong = getterUtil.getLong(groupSvc.getCompanyGroup(companyId).getGroupId())>
211 <#assign article = articleSvc.getArticle(groupIdLong, articleId)>
212 </#if>
213
214
215 <#if (article?has_content)>
216
217 <#assign assetEntry = assetEntrySvc.fetchEntry(articleClass.getClassName(), article.getResourcePrimKey())>
218
219 <#assign assetEntryId = assetEntry.getEntryId()>
220 <#assign assetEntryIdLong = getterUtil.getLong(assetEntryId)>
221
222 <#assign assetLinkSvc = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService")>
223
224 <#if (assetLinkSvc?has_content)>
225
226 <#assign assetLinks = assetLinkSvc.getDirectLinks(assetEntryIdLong)>
227 <#list assetLinks as assetLink>
228 <#if (getterUtil.getLong(assetLink.getEntryId1()) == assetEntryIdLong)>
229 <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId2()))>
230 <#else>
231 <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId1()))>
232 </#if>
233
234 <#assign classPK = assetLinkEntry.getClassPK()>
235
236 <#assign relatedArticle = articleSvc.getLatestArticle(getterUtil.getLong(classPK))>
237
238 <#if (relatedArticle?has_content)>
239
240 <#assign relatedStructureId = relatedArticle.structureId>
241
242 <#if (relatedStructureId == "DOCUMENT_RECOMANAT" )>
243 <#assign relatedArticleTemplateId = "RECOMANACIÓ_" + relatedStructureId>
244 <#else>
245 <#assign relatedArticleTemplateId = "RECOMANACIÓ_ALTRE">
246 </#if>
247
248 <#assign languageId = localeUtil.toLanguageId(locale)>
249
250 <#if image.getData()?has_content && image.getData()?length != 0>
251 <#assign imgSrc = image.getData()>
252 <#else>
253 <#assign imgSrc = image.urlExterna.getData()>
254 </#if>
255
256 <#if (imgSrc?has_content)>
257 <p class="img"><img src="${imgSrc}" alt="${title.data}" /></p>
258 </#if>
259
260 ${journalContentUtil.getContent(groupIdLong,relatedArticle.articleId,relatedArticleTemplateId,viewMode,languageId,themeDisplay)}
261 <#else>
262 <p style="display:none">No se ha recuperado ningún artículo con el id [${articleConnection.secondaryId}]</p>
263 </#if>
264 </#list>
265 </#if>
266
267 <#else>
268
269 <p style="display:none">Problema al recuperar el artículo del grupo [${groupIdLong}], con articleId [${articleId}]</p>
270
271 </#if>
272
273
274
275
276
277
278
279
280
281 <#assign idUsuario = getterUtil.getLong(themeDisplay.getUserId())>
282 <#if (idUsuario gt 0)>
283 <#assign userService =serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")>
284 <#assign user = userService.getUserById(getterUtil.getLong(themeDisplay.getUserId()))>
285 </#if>
286
287 </div>
288
289 <div class="valoraciones">
290
291
292
293 <!-- AddThis Button BEGIN -->
294
295 <#assign titolRecomanacio=languageUtil.get(locale, title.getData())>
296 <#if (relatedArticle?has_content)>
297 <#assign titolRecomanacio=languageUtil.get(locale, relatedArticle.title.data)>
298 </#if>
299 <div class="w-100 py-2 a2a_kit a2a_kit_size_32 a2a_default_style" data-a2a-url="https://bibliotecavirtual.diba.cat/detall-recomanacio/-/contingut/${groupId}/${urltitle}" data-a2a-title="${title.getData()}" style="background-color: #e6e6e6;display: inline-block;" data-a2a-icon-color="#e6e6e6,#000000">
300 <!-- AddToAny BEGIN -->
301 <div class="a2a_kit a2a_kit_size_32 a2a_default_style">
302 <a class="a2a_dd" href="https://www.addtoany.com/share"></a>
303 <a class="a2a_button_email"></a>
304 <a class="a2a_button_print"></a>
305 </div>
306
307<script>
308var a2a_config = a2a_config || {};
309a2a_config.onclick = false;
310a2a_config.locale = "es";
311
312</script>
313
314<script async src="https://static.addtoany.com/menu/page.js"></script>
315</div>
316
317
318
319
320 <!-- AddThis Button END -->
321
322
323
324
325
326
327 <#if (validator.isNotNull($user) && !user.isDefaultUser()) >
328 <form name="fmGuardarRecomendacion${id}" action="" method="post">
329
330 <input type="button" class="botoDesar" name="save" value="Desa" onclick="javascript:saveEntryAction("fmGuardarRecomendacion${id}");"/>
331
332 </form>
333 </#if>
334
335 </div>
336
337
338 </div>
339
340 <div class="recomanacio_detall">
341
342 ${recomendationText.getData()}
343
344 </div>
345
346 <#if (article?has_content)>
347
348 <span class="modificationDate">${dateUtil.format( "dd/MM/yyyy", article.modifiedDate )}</span>
349
350 </#if>
351
352 </div>
353</#if>