Albisteak - Ikasnova
Albisteak
Emaitzak
158 emaitza erakusten
Errorea gertatu da txantiloia prozesatzerakoan.
The following has evaluated to null or missing:
==> imageJSON.groupId [in template "209613#209652#215892" at line 15, column 80]
----
Tip: It's the step after the last dot that caused this error, not those before it.
----
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: #assign image = "/documents/${imageJS... [in template "209613#209652#215892" at line 15, column 49]
----
1<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
2<#if entries?has_content>
3 <div class="row text-break three-columns-post">
4 <#list entries as curEntry>
5 <#if curEntry.getAssetRenderer().getClassName() == "com.liferay.journal.model.JournalArticle">
6 <#assign article = journalArticleService.getLatestArticle(getterUtil.getLong(curEntry.getClassPK())) />
7 <#assign rootElement = saxReaderUtil.read(article.getContentByLocale(locale)).getRootElement() />
8 <#assign selectorImage = saxReaderUtil.createXPath("dynamic-element[@name='image']") />
9 <#assign image = "" />
10 <#assign alt = "" />
11 <#if selectorImage.selectSingleNode(rootElement)?has_content>
12 <#assign image = selectorImage.selectSingleNode(rootElement).getStringValue()?trim />
13 <#if image != "">
14 <#assign imageJSON = image?eval />
15 <#assign image = "/documents/${imageJSON.groupId}/${imageJSON.fileEntryId}/${imageJSON.name}/${imageJSON.uuid}" />
16 <#assign alt = imageJSON.alt />
17 </#if>
18 </#if>
19 <#if image == "">
20 <#assign image = "${themeDisplay.getPathThemeImages()}/images-default-contents.jpg" />
21 </#if>
22 <#assign selectorContent = saxReaderUtil.createXPath("dynamic-element[@name='content']") />
23 <#assign timeLabel = "" />
24 <#if selectorContent.selectSingleNode(rootElement)?has_content>
25 <#assign content = selectorContent.selectSingleNode(rootElement).getStringValue()?trim />
26 <#if content != "">
27 <#assign contentCount = content?replace("<[^>]+>", "", "r")?word_list?size />
28 <#if contentCount gt 0>
29 <#assign minutesValue = (contentCount/200)?round />
30 <#if minutesValue == 0>
31 <#assign timeLabel = languageUtil.get(locale, "few-seconds")/>
32 <#elseif minutesValue == 1>
33 <#assign timeLabel = minutesValue + " " + languageUtil.get(locale, "minut")/>
34 <#else>
35 <#assign timeLabel = minutesValue + " " + languageUtil.get(locale, "minutes")/>
36 </#if>
37 </#if>
38 </#if>
39 </#if>
40 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry.getAssetRenderer(), curEntry, !stringUtil.equals(assetLinkBehavior, "showFullContent")) />
41 <div class="col-12 col-md-4 three-columns-post__item">
42 <a href="${viewURL}">
43 <div class="aspect-ratio aspect-ratio-16-to-9 three-columns-post__item__image">
44 <#if alt == "">
45 <#assign alt = article.getTitle(locale) />
46 </#if>
47 <img src="${image}" alt="${alt}" class="aspect-ratio-item-center-middle aspect-ratio-item-fluid" />
48 </div>
49 </a>
50 <#if themeDisplay.getLocale().toString() == "eu_ES">
51 <p class="three-columns-post__item__date">${article.getDisplayDate()?date?string['yyyy/MM/dd']}</p>
52 <#else>
53 <p class="three-columns-post__item__date">${article.getDisplayDate()?date?string['dd/MM/yyyy']}</p>
54 </#if>
55 <p class="three-columns-post__item__time">
56 <img alt="<@liferay.language key="icon-clock" />" src="${themeDisplay.getPathThemeImages()}/icons/icon-clock.svg" />
57 <span class="tiempo_lectura">${timeLabel}</span>
58 </p>
59 <a href="${viewURL}" class="three-columns-post__item__link">
60 <h3 class="mb-sm-5">${article.getTitle(locale)}</h3>
61 </a>
62 </div>
63 </#if>
64 </#list>
65 </div>
66</#if>