Ruta de navegación

bloque-actualidad

LATEST NEWS

Aplicaciones anidadas

Publicador de contenidos

An error occurred while processing the template.
The following has evaluated to null or missing:
==> journalArticleLocalService.fetchLatestArticle(curEntry.getClassPK())  [in template "10136#10174#153676729" at line 84, column 36]

----
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 article = journalArticleLocal...  [in template "10136#10174#153676729" at line 84, column 17]
----
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 
6 
7 
8<#assign groupFriendlyURL = themeDisplay.getScopeGroup().getFriendlyURL() /> 
9<#assign friendlyURL = themeDisplay.getScopeGroup().getPathFriendlyURL(false,themeDisplay) + groupFriendlyURL /> 
10<#assign actualURLFriendly = portalUtil.getHost(request) + friendlyURL /> 
11<#assign scopeGroupId = themeDisplay.getScopeGroupId() /> 
12 
13<#assign PortalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"] /> 
14<#assign URLEncoder = staticUtil["java.net.URLEncoder"] /> 
15<#assign Normalizer = staticUtil["java.text.Normalizer"] /> 
16<#assign currentGroupSite = themeDisplay.getLayout().getGroup().getFriendlyURL()  /> 
17<#if themeDisplay.getLayout().getPrivateLayout() == true > 
18    <#assign state = themeDisplay.getPathFriendlyURLPrivateGroup()/> 
19<#else> 
20    <#assign state = themeDisplay.getPathFriendlyURLPublic()/> 
21</#if> 
22 
23 
24 
25<#assign imagen = languageUtil.get(locale, "listado.noticia.imagen")> 
26<#assign texto = languageUtil.get(locale, "listado.noticia.texto")> 
27<#assign instanceId = themeDisplay.getPortletDisplay().getId()?replace("com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_", "")> 
28<#assign originalInstanceId = themeDisplay.getPortletDisplay().getId()?replace("com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_", "")> 
29<#assign currentPageUrl = PortalUtil.getLayoutURL(themeDisplay.getLayout(),themeDisplay)> 
30<#assign currentLayoutFriendlyUrl = themeDisplay.getLayoutFriendlyURL(themeDisplay.getLayout())> 
31 
32<#-- custom fields  
33<#assign expandos = themeDisplay.getScopeGroup().getExpandoBridge().getAttributes()> 
34<#list expandos?keys as key> 
35 ${key} 
36</#list> 
37--> 
38 
39 
40<#-- site_news_asset_publisher_instance_id name of the custom field for the asset publisher instance id of the site --> 
41<#assign site_news_asset_publisher_instance_id = layout.getGroup().getExpandoBridge().getAttribute("site_news_asset_publisher_instance_id")> 
42<#-- by default the main site asset publisher id --> 
43<#assign site_news_asset_publisher_instance_id_default = layout.getGroup().getExpandoBridge().getAttributeDefault("site_news_asset_publisher_instance_id")> 
44<#-- site_news_url name of the custom field url of the news page of the site --> 
45<#assign site_news_url = themeDisplay.getScopeGroup().getExpandoBridge().getAttribute("site_news_url")> 
46<#-- by default the main site news page --> 
47<#assign site_news_url_default = themeDisplay.getScopeGroup().getExpandoBridge().getAttributeDefault("site_news_url")> 
48 
49 
50<#-- get site_news_url custom field value for the site --> 
51<#list site_news_url?keys as key> 
52	<#if key == locale> 
53		<#assign site_news_url_value = site_news_url?values[key?index]> 
54	</#if> 
55</#list> 
56 
57<#-- get site_news_url custom field default value--> 
58<#list site_news_url_default?keys as key> 
59	<#if key == locale> 
60		<#assign site_news_url_default_value = site_news_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_news_url_value??> 
66<#else> 
67	<#if site_news_url_default_value??> 
68		<#assign site_news_url_value = site_news_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_news_asset_publisher_instance_id??> 
74<#else> 
75	<#if site_news_asset_publisher_instance_id_default??> 
76		<#assign site_news_asset_publisher_instance_id = site_news_asset_publisher_instance_id_default> 
77	</#if> 
78</#if> 
79 
80  
81<section class="unav-news-list"> 
82    <#if entries?has_content> 
83    	<#list entries as curEntry> 
84    		<#assign article = journalArticleLocalService.fetchLatestArticle(curEntry.getClassPK()) /> 
85    		<#assign assetRendererDate = curEntry.getAssetRenderer() /> 
86				    		 <#assign aArticleXML = saxReaderUtil.read(article.getContentByLocale(locale)) /> 
87            <#assign contentFecha = aArticleXML.valueOf("//dynamic-element[@field-reference='Fecha_noticia']/dynamic-content/text()") /> 
88 
89<#attempt> 
90    <#if contentFecha != ""> 
91        <#assign fechaParseada = contentFecha?date("yyyy-MM-dd")  /> 
92        <#assign contentFechaURLString = fechaParseada?string["dd/MM/yyyy"] /> 
93        <#assign contentFechaString = fechaParseada?date?string["dd | MM | yyyy"] /> 
94			<#else> 
95				    <#assign assetRendererDate = curEntry.getAssetRenderer() /> 
96    <#assign contentFecha = article.getDisplayDate()?date /> 
97    <#assign contentFechaURLString = contentFecha?string["dd/MM/yyyy"] /> 
98    <#assign contentFechaString = contentFecha?date?string["dd | MM | yyyy"] /> 
99				 
100    </#if> 
101<#recover> 
102    <#-- Si el parseo falla, usamos assetRenderer y article.getDisplayDate() --> 
103    <#assign assetRendererDate = curEntry.getAssetRenderer() /> 
104    <#assign contentFecha = article.getDisplayDate()?date /> 
105    <#assign contentFechaURLString = contentFecha?string["dd/MM/yyyy"] /> 
106    <#assign contentFechaString = contentFecha?date?string["dd | MM | yyyy"] /> 
107</#attempt> 
108 
109 
110    		 <#assign tituloNoticia = aArticleXML.valueOf("//dynamic-element[@name='Titulo_noticia']/dynamic-content/text()") /> 
111    		 <#assign autorNombre = aArticleXML.valueOf("//dynamic-element[@name='Nombre_autor']/dynamic-content/text()") /> 
112    		 <#assign autorImagen = aArticleXML.valueOf("//dynamic-element[@name='Autor_imagen']/dynamic-content/text()") /> 
113    		 <#assign jsonObjectString = aArticleXML.valueOf("//dynamic-element[@name='Imagen']/dynamic-content/text()") /> 
114    		  
115    		 <#assign video = aArticleXML.valueOf("//dynamic-element[@name='Video_youtube']/dynamic-content/text()") /> 
116    		  
117    		 <#assign friendlyContentURL = assetPublisherHelper.getAssetViewURL(portalUtil.getLiferayPortletRequest(renderRequest), portalUtil.getLiferayPortletResponse(renderResponse), curEntry,true) /> 
118 
119            <#assign tituloNoticiaEncoded = friendlyUrlDecode(tituloNoticia)> 
120    		  
121 			<#-- Asset publisher instance id in main domain --> 
122 			<#assign mainDomainInstanceId = "lovPblW1fC70"> 
123            <#-- Urls generated always the same page for unav requirements--> 
124            <#-- In main domain, go to main news page and use that asset publisher id. Causes issues with other domains --> 
125            <#-- TODO: remove once custom fields are created--> 
126            <#assign urlNews = languageUtil.get(locale, "url.news.details", "/noticias")> 
127            <#assign instanceId = mainDomainInstanceId> 
128 			 
129 			<#-- Configure url and asset publisher instance id with customFields--> 
130 			<#-- By default configured with main domain news page and asset publisher id. Other domains have to configure it manually in the site configuration --> 
131			<#if site_news_url_value??> 
132				<#assign urlNews = site_news_url_value> 				 
133			</#if> 
134			<#if site_news_asset_publisher_instance_id??> 
135				<#assign instanceId = site_news_asset_publisher_instance_id> 				 
136			</#if> 
137 
138            <#-- WORKAROUND FOR TEMPORAL SITES GO LIVE --> 
139			<#-- lfr.cloud domain urls work differently, redirection to site news has to be adapted for it--> 
140			<#if actualURLFriendly?contains("lfr.cloud")> 
141				<#-- 1. Site with default news page. if using the default value, redirect to main site and use mainDomainInstanceId.--> 
142				<#if site_news_url_default_value == site_news_url_value> 
143					<#assign urlNews = site_news_url_value> 
144					<#assign instanceId = mainDomainInstanceId> 
145				<#else> 
146					<#-- 2. Site with custom news page. if site site_news_url_value contains /web/site/, use site_news_url_value as is and use originalInstanceId to redirect within the site--> 
147					<#if site_news_url_value?contains("/web"+groupFriendlyURL)> 
148						<#assign urlNews = site_news_url_value> 
149						<#assign instanceId = originalInstanceId> 
150						 
151					<#-- 3. Site with custom domain and custom news page. if site site_news_url_value doesn't contain /web/site/ , prepend /web/site to it, to redirect within the site--> 
152					<#else> 
153						<#assign urlNews = "/web"+groupFriendlyURL + site_news_url_value> 
154						<#assign instanceId = originalInstanceId> 
155					</#if> 
156				</#if> 
157				 
158			</#if> 
159 
160            <#assign urlDetail = urlNews+"/-/contents/"+contentFechaURLString+"/"+tituloNoticiaEncoded+"/content/"+instanceId+"/"+curEntry.getEntryId()> 
161             
162<#assign foto = "" > 
163            <a href="${urlDetail}" class="unav-news-list__item"> 
164    		  <#if jsonObjectString?? && jsonObjectString?has_content> 
165    		         <#attempt> 
166                        <#assign jsonObject = jsonObjectString?eval> 
167                        <#assign entryUuid = jsonObject.uuid /> 
168                        <#assign entryGroupId = getterUtil.getLong(jsonObject.groupId) /> 
169                        <#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(entryUuid, entryGroupId) /> 
170                        <#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", dlFileEntry.fileEntryId) /> 
171                        <#assign assetRenderer = assetEntry.assetRenderer /> 
172                        <#assign foto = assetRenderer.getURLDownload(themeDisplay) /> 
173                         
174            	        <div class="unav-news-list__img" style="background-image: url('${foto});">&nbsp;</div> 
175                    <#recover> 
176 
177                    </#attempt> 
178                  </#if>     
179                 <#if video?has_content> 
180                    <#if foto == "">  
181                          
182						<div class="unav-news-list__img" style="background-image:url(http://img.youtube.com/vi/${video}/0.jpg)">&nbsp; 
183						</div>        
184					</#if> 
185                  </#if> 
186                   
187                    <div class="unav-news-list__container-txt"> 
188                        <p class="unav__text__date">${contentFechaString}</p> 
189                         
190                        <p class="unav__text unav__text--m">${tituloNoticia}</p> 
191                     
192                        <div class="unav-news-list__info"> 
193                            <#if autorNombre?has_content> 
194                                <p class="unav-writing__info-txt"><span class="unav-writing__info-bold">${texto}</span>${autorNombre}</p> 
195                            </#if> 
196                            <#if autorImagen?has_content> 
197                                <p class="unav-writing__info-txt"><span class="unav-writing__info-bold">${imagen}</span>${autorImagen}</p> 
198                            </#if> 
199                        </div> 
200                    </div> 
201            </a> 
202    	</#list> 
203    </#if> 
204 
205     
206</section> 
207 
208<script> 
209   $(document).ready(function() { 
210       // Avoid losing focus when paginating 
211       if ($('.lfr-pagination-buttons')) { 
212           var paginationButtons = $('.lfr-pagination-buttons').children(); 
213for (const paginationButton of paginationButtons) {  
214                varlink = $(paginationButton).children(); 
215if(link) { 
216$(link).click(function(e){  
217e.preventDefault(); 
218var url = $(this).attr('href'); 
219                       window.location.href = url + '#unav-news-list'; 
220}); 
221
222
223
224   }); 
225																																																			  
226   function _com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_lovPblW1fC70_handleDropdownKeyPress(button, list, options, pageIterator) {} 
227</script> 
228 
229<#function friendlyUrlDecode title> 
230 
231    <#assign titleFriendly = title?replace("[^A-Za-z0-9À-ú ]", "", "r")?lower_case> 
232    <#assign titleFriendly = titleFriendly?replace("á", "a", "r")> 
233    <#assign titleFriendly = titleFriendly?replace("é", "e", "r")> 
234    <#assign titleFriendly = titleFriendly?replace("í", "i", "r")> 
235    <#assign titleFriendly = titleFriendly?replace("ó", "o", "r")> 
236    <#assign titleFriendly = titleFriendly?replace("ú", "u", "r")> 
237    <#assign titleFriendly = titleFriendly?replace("ñ", "n", "r")> 
238    <#assign titleFriendly = URLEncoder.encode(titleFriendly)> 
239    <#assign titleFriendly = titleFriendly?replace("\\+", "-","r")> 
240    <#return titleFriendly> 
241</#function> 

bloque-tantaka-instragram

TANTAKA ON INSTAGRAM

tantaka-instagram

bloque-podcast

PODCAST

Aplicaciones anidadas

Aplicaciones anidadas

banner-superarte


 

texto-superarte

"SuperARTE is the program dedicated to inclusion, equality and opportunities for all. A position of Marta Ibáñez (person with cerebral palsy) and with the partnership of Tantaka".

boton-escucha-podcast

bloque-reportajes

FEATURES

Aplicaciones anidadas

banner-tiempo-transforma


 

banner-campus-sin-limites