Opinión
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> contentFechaURLString [in template "10136#10174#153676839" at line 137, column 60]
----
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 urlDetail = urlOpinion + "/-/... [in template "10136#10174#153676839" at line 137, column 13]
----
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
2<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") />
3<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
4
5<#assign groupFriendlyURL = themeDisplay.getScopeGroup().getFriendlyURL() />
6<#assign friendlyURL = themeDisplay.getScopeGroup().getPathFriendlyURL(false,themeDisplay) + groupFriendlyURL />
7<#assign actualURLFriendly = portalUtil.getHost(request) + friendlyURL />
8<#assign scopeGroupId = themeDisplay.getScopeGroupId() />
9
10<#assign PortalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"] />
11<#assign URLEncoder = staticUtil["java.net.URLEncoder"] />
12<#assign Normalizer = staticUtil["java.text.Normalizer"] />
13<#assign currentGroupSite = themeDisplay.getLayout().getGroup().getFriendlyURL() />
14
15<#assign publicado = languageUtil.get(locale, "listado.opinion.publicado")>
16<#assign imagen = languageUtil.get(locale, "listado.opinion.imagen")>
17<#assign texto = languageUtil.get(locale, "listado.opinion.texto")>
18
19<#assign instanceId = themeDisplay.getPortletDisplay().getId()?replace("com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_", "")>
20<#assign originalInstanceId = themeDisplay.getPortletDisplay().getId()?replace("com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_", "")>
21
22
23
24<#assign currentPageUrl = PortalUtil.getLayoutURL(themeDisplay.getLayout(),themeDisplay)>
25
26<#-- test -->
27<#assign currentLayoutFriendlyUrl = themeDisplay.getLayoutFriendlyURL(themeDisplay.getLayout())>
28
29
30 <!-- scopeGroupId: ${scopeGroupId} -->
31 <!-- groupFriendlyURL: ${groupFriendlyURL} -->
32 <!-- friendlyURL: ${friendlyURL} -->
33 <!-- actualURLFriendly: ${actualURLFriendly} -->
34 <!-- currentPageUrl: ${currentPageUrl} -->
35 <!-- currentGroupSite: ${currentGroupSite} -->
36 <!-- currentLayoutFriendlyUrl: ${currentLayoutFriendlyUrl} -->
37 <!-- instanceId: ${instanceId} -->
38 <#-- end test -->
39
40 <#-- site_opinions_asset_publisher_instance_id name of the custom field for the asset publisher instance id of the site -->
41<#assign site_opinions_asset_publisher_instance_id = layout.getGroup().getExpandoBridge().getAttribute("site_opinions_asset_publisher_instance_id")>
42<#-- by default the main site asset publisher id -->
43<#assign site_opinions_asset_publisher_instance_id_default = layout.getGroup().getExpandoBridge().getAttributeDefault("site_opinions_asset_publisher_instance_id")>
44<#-- site_opinions_url name of the custom field url of the opinions page of the site -->
45<#assign site_opinions_url = themeDisplay.getScopeGroup().getExpandoBridge().getAttribute("site_opinions_url")>
46<#-- by default the main site opinions page -->
47<#assign site_opinions_url_default = themeDisplay.getScopeGroup().getExpandoBridge().getAttributeDefault("site_opinions_url")>
48
49
50 <#-- get site_opinions_url custom field value for the site -->
51<#list site_opinions_url?keys as key>
52 <#if key == locale>
53 <#assign site_opinions_url_value = site_opinions_url?values[key?index]>
54 </#if>
55</#list>
56
57<#-- get site_opinions_url custom field default value-->
58<#list site_opinions_url_default?keys as key>
59 <#if key == locale>
60 <#assign site_opinions_url_default_value = site_opinions_url_default?values[key?index]>
61 </#if>
62</#list>
63
64<#-- assign the url if the site has custom field. Use the default value otherwise-->
65<#if site_opinions_url_value??>
66<#else>
67 <#if site_opinions_url_default_value??>
68 <#assign site_opinions_url_value = site_opinions_url_default_value>
69 </#if>
70</#if>
71
72<#-- assign the instance id if the site has custom field. Use the default value otherwise-->
73<#if site_opinions_asset_publisher_instance_id??>
74<#else>
75 <#if site_opinions_asset_publisher_instance_id_default??>
76 <#assign site_opinions_asset_publisher_instance_id = site_opinions_asset_publisher_instance_id_default>
77 </#if>
78</#if>
79
80
81<section class="unav-news-list">
82
83 <#if entries?has_content>
84 <#list entries as curEntry>
85
86 <#assign article = journalArticleLocalService.fetchLatestArticle(curEntry.getClassPK()) />
87 <#assign aArticleXML = saxReaderUtil.read(article.getContentByLocale(locale)) />
88 <#assign contentFecha = aArticleXML.valueOf("//dynamic-element[@field-reference='fechaNueva']/dynamic-content/text()") />
89
90<#attempt>
91 <#if contentFecha != "">
92 <#assign fechaParseada = contentFecha?date("yyyy-MM-dd") />
93 <#assign contentFechaURLString = fechaParseada?string["dd/MM/yyyy"] />
94 <#assign contentFechaString = fechaParseada?date?string["dd | MM | yyyy"] />
95 </#if>
96<#recover>
97 <#-- Si el parseo falla, usamos assetRenderer y article.getDisplayDate() -->
98 <#assign assetRendererDate = curEntry.getAssetRenderer() />
99 <#assign contentFecha = article.getDisplayDate()?date />
100 <#assign contentFechaURLString = contentFecha?string["dd/MM/yyyy"] />
101 <#assign contentFechaString = contentFecha?date?string["dd | MM | yyyy"] />
102</#attempt>
103
104 <#assign tituloArtitulo = aArticleXML.valueOf("//dynamic-element[@name='Titulo_articulo']/dynamic-content/text()") />
105 <#assign articulo = aArticleXML.valueOf("//dynamic-element[@name='Entradilla']/dynamic-content/text()") />
106 <#assign titulo_publicacion = aArticleXML.valueOf("//dynamic-element[@name='Publicado_en']/dynamic-content/text()") />
107
108 <#assign friendlyContentURL = assetPublisherHelper.getAssetViewURL(portalUtil.getLiferayPortletRequest(renderRequest), portalUtil.getLiferayPortletResponse(renderResponse), curEntry,true) />
109
110
111 <#assign tituloArtituloEncoded = friendlyUrlDecode(tituloArtitulo)>
112
113 <#-- Asset publisher instance id in main domain -->
114 <#assign mainDomainInstanceId = "CnBM7sduyZOb">
115
116 <#-- Urls generated always the same page for unav requirements -->
117 <#-- TODO: remove once custom fields are created-->
118 <#assign urlOpinion = languageUtil.get(locale, "url.opinion.details", "/opinion")>
119 <#assign instanceId = mainDomainInstanceId>
120
121
122 <#-- Configure url and asset publisher instance id with customFields-->
123 <#if site_opinions_url_value??>
124 <#assign urlOpinion = site_opinions_url_value>
125 </#if>
126 <#if site_opinions_asset_publisher_instance_id??>
127 <#assign instanceId = site_opinions_asset_publisher_instance_id>
128 </#if>
129
130 <#-- WORKAROUND FOR TEMPORAL SITES GO LIVE -->
131 <#if actualURLFriendly?contains("lfr.cloud")>
132 <#assign urlOpinion = "/web"+groupFriendlyURL + currentLayoutFriendlyUrl>
133 <#assign instanceId = originalInstanceId>
134 </#if>
135
136
137 <#assign urlDetail = urlOpinion+"/-/contents/"+contentFechaURLString+"/"+tituloArtituloEncoded+"/content/"+instanceId+"/"+curEntry.getEntryId()>
138
139
140 <div class="unav-news-list__body">
141 <a href="${urlDetail}" class="unav-news-list__item">
142
143 <div class="unav-news-list__container-txt unav-news-list__container-txt--full">
144
145 <p class="unav__text__date">${contentFechaString}</p>
146
147 <#if tituloArtitulo?has_content>
148
149 <p class="unav__text unav__text--m unav__text--margin-m">${tituloArtitulo}</p>
150
151
152<#assign autoresFieldsets = aArticleXML.selectNodes("//dynamic-element[@name='Nombre_autorFieldSet']") />
153
154<#if autoresFieldsets?has_content>
155 <#list autoresFieldsets as autorFieldset>
156 <#assign nombreAutorNode = autorFieldset.selectSingleNode(".//dynamic-element[@name='Nombre_autor']/dynamic-content")>
157 <#assign cargoAutorNode = autorFieldset.selectSingleNode(".//dynamic-element[@name='Cargo_autor']/dynamic-content")>
158
159 <#if nombreAutorNode??>
160 <p class="unav__text unav__text--bold">${nombreAutorNode.getText()}</p>
161 </#if>
162 <#if cargoAutorNode??>
163 <p class="unav__text unav__text--regular">${cargoAutorNode.getText()}</p>
164 </#if>
165 </#list>
166</#if>
167
168
169 <#if titulo_publicacion?has_content>
170 <p class="unav__text unav__text--regular"><span class="unav__text--bold unav__text--m-right">${publicado}</span>${titulo_publicacion}</p>
171 </#if>
172
173
174 </#if>
175
176
177 </div>
178 </a>
179 </div>
180
181 </#list>
182 </#if>
183
184</section>
185
186<#function friendlyUrlDecode title>
187
188 <#assign titleFriendly = title?replace("[^A-Za-z0-9À-ú ]", "", "r")?lower_case>
189 <#assign titleFriendly = titleFriendly?replace("á", "a", "r")>
190 <#assign titleFriendly = titleFriendly?replace("é", "e", "r")>
191 <#assign titleFriendly = titleFriendly?replace("í", "i", "r")>
192 <#assign titleFriendly = titleFriendly?replace("ó", "o", "r")>
193 <#assign titleFriendly = titleFriendly?replace("ú", "u", "r")>
194 <#assign titleFriendly = titleFriendly?replace("ñ", "n", "r")>
195 <#assign titleFriendly = URLEncoder.encode(titleFriendly)>
196 <#assign titleFriendly = titleFriendly?replace("\\+", "-","r")>
197 <#return titleFriendly>
198</#function>
Contacto
Esperanza Rodés
Communications Office
erodes@unav.es
Edificio Ismael Sánchez Bella
31009 Pamplona, España
+34 948 425 600 x 802574