Ruta de navegación

carrusel_home

Aplicaciones anidadas

contenidowebbasico-ultimasentradas

Últimas entradas

Publicador de contenidos

Se ha producido un error al procesar la plantilla.
The string doesn't match the expected date/time/date-time format. The string to parse was: "". The expected format was: "yyyy-MM-dd".
The nested reason given follows:
Unparseable date: ""

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign dateToUse = aArticleXML.value...  [in template "10136#10174#153676897" at line 93, column 65]
----
1<#assign dateFormat = "dd|MM|yyyy"> 
2<#if (locale == "en_US")> 
3    <#assign dateFormat = "yyyy|MM|dd"> 
4<#elseif (locale == "eu_ES")> 
5    <#assign dateFormat = "MM|dd|yyyy"> 
6</#if> 
7<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
8<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") /> 
9<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
10<#assign groupFriendlyURL = themeDisplay.getScopeGroup().getFriendlyURL() /> 
11<#assign friendlyURL = themeDisplay.getScopeGroup().getPathFriendlyURL(false,themeDisplay) + groupFriendlyURL /> 
12<#assign actualURLFriendly = portalUtil.getHost(request) + friendlyURL /> 
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<#assign readMore = languageUtil.get(locale, "leer.mas")> 
23<#assign instanceId = themeDisplay.getPortletDisplay().getId()?replace("com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_", "")> 
24<#assign originalInstanceId = themeDisplay.getPortletDisplay().getId()?replace("com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_", "")> 
25<#assign currentPageUrl = PortalUtil.getLayoutURL(themeDisplay.getLayout(),themeDisplay)> 
26<#assign instanceId ="lovPblW1fC70"> 
27<#assign currentLayoutFriendlyUrl = themeDisplay.getLayoutFriendlyURL(themeDisplay.getLayout())> 
28 
29<#-- site_news_asset_publisher_instance_id name of the custom field for the asset publisher instance id of the site --> 
30<#assign site_news_asset_publisher_instance_id = layout.getGroup().getExpandoBridge().getAttribute("site_news_asset_publisher_instance_id")> 
31<#-- by default the main site asset publisher id --> 
32<#assign site_news_asset_publisher_instance_id_default = layout.getGroup().getExpandoBridge().getAttributeDefault("site_news_asset_publisher_instance_id")> 
33<#-- site_news_url name of the custom field url of the news page of the site --> 
34<#assign site_news_url = themeDisplay.getScopeGroup().getExpandoBridge().getAttribute("site_news_url")> 
35<#-- by default the main site news page --> 
36<#assign site_news_url_default = themeDisplay.getScopeGroup().getExpandoBridge().getAttributeDefault("site_news_url")> 
37 
38 
39 <#-- get site_news_url custom field value for the site --> 
40<#list site_news_url?keys as key> 
41	<#if key == locale> 
42		<#assign site_news_url_value = site_news_url?values[key?index]> 
43	</#if> 
44</#list> 
45 
46<#-- get site_news_url custom field default value--> 
47<#list site_news_url_default?keys as key> 
48	<#if key == locale> 
49		<#assign site_news_url_default_value = site_news_url_default?values[key?index]> 
50	</#if> 
51</#list> 
52 
53<#-- assign the url if the site has custom field. Use the default value otherwise--> 
54<#if site_news_url_value??> 
55<#else> 
56	<#if site_news_url_default_value??> 
57		<#assign site_news_url_value = site_news_url_default_value> 
58	</#if> 
59</#if> 
60 
61<#-- assign the instance id if the site has custom field. Use the default value otherwise--> 
62<#if site_news_asset_publisher_instance_id??> 
63<#else> 
64	<#if site_news_asset_publisher_instance_id_default??> 
65		<#assign site_news_asset_publisher_instance_id = site_news_asset_publisher_instance_id_default> 
66	</#if> 
67</#if> 
68 
69<#if entries?has_content> 
70    <div class="container"> 
71        <div class="row"> 
72            <#list entries as curEntry> 
73                <#assign article = journalArticleLocalService.fetchLatestArticle(curEntry.getClassPK()) /> 
74                <#assign assetRendererDate = curEntry.getAssetRenderer() /> 
75<#assign contentFecha = (article.displayDate?has_content?then(article.displayDate, article.modifiedDate))?date /> 
76 
77                <#assign contentFechaURLString = contentFecha?date?string["dd/MM/yyyy"] /> 
78                <#assign contentFechaString = contentFecha?date?string["dd | MM | yyyy"] /> 
79                <#assign aArticleXML = saxReaderUtil.read(article.getContentByLocale(locale)) /> 
80                <#assign tituloNoticia = aArticleXML.valueOf("//dynamic-element[@name='Titulo_noticia']/dynamic-content/text()") /> 
81                <#assign entradilla = aArticleXML.valueOf("//dynamic-element[@name='subtitulo']/dynamic-content/text()") /> 
82                <#assign autorNombre = aArticleXML.valueOf("//dynamic-element[@name='Nombre_autor']/dynamic-content/text()") /> 
83                <#assign autorImagen = aArticleXML.valueOf("//dynamic-element[@name='Autor_imagen']/dynamic-content/text()") /> 
84                <#assign jsonObjectString = aArticleXML.valueOf("//dynamic-element[@name='Imagen']/dynamic-content/text()") /> 
85                <#assign idNoticia = curEntry.getClassPK()/> 
86                <#assign video = aArticleXML.valueOf("//dynamic-element[@name='Video_youtube']/dynamic-content/text()") /> 
87                <#assign friendlyContentURL = assetPublisherHelper.getAssetViewURL(portalUtil.getLiferayPortletRequest(renderRequest), portalUtil.getLiferayPortletResponse(renderResponse), curEntry,true) /> 
88                <#assign tituloNoticiaEncoded = friendlyUrlDecode(tituloNoticia)> 
89									 
90								<#assign journalArticleStructure = article.getDDMStructure().getName(locale)/> 
91								<#assign dateToUse = article.getDisplayDate()/>			 
92								<#if journalArticleStructure = "7_Noticia"> 
93								<#assign dateToUse = aArticleXML.valueOf("//dynamic-element[@name='Fecha_noticia']/dynamic-content/text()")?date("yyyy-MM-dd") /> 
94								<#assign contentFechaURLString = aArticleXML.valueOf("//dynamic-element[@name='Fecha_noticia']/dynamic-content/text()")?date("yyyy-MM-dd")?string["dd/MM/yyyy"] /> 
95								</#if>																																								  
96								<#if journalArticleStructure = "7_detalle_opinion"> 
97								<#assign dateToUse = aArticleXML.valueOf("//dynamic-element[@field-reference='fechaNueva']/dynamic-content/text()")?date("yyyy-MM-dd") /> 
98								<#assign contentFechaURLString = aArticleXML.valueOf("//dynamic-element[@field-reference='fechaNueva'']/dynamic-content/text()")?date("yyyy-MM-dd")?string["dd/MM/yyyy"]/> 
99								</#if>		 
100                 
101                 
102	 			<#-- Asset publisher instance id in main domain --> 
103	 			<#assign mainDomainInstanceId = "lovPblW1fC70"> 
104	            <#-- Urls generated always the same page for unav requirements--> 
105	            <#-- In main domain, go to main news page and use that asset publisher id. Causes issues with other domains --> 
106	            <#-- TODO: remove once custom fields are created--> 
107	            <#assign urlNews = languageUtil.get(locale, "url.news.details", "/noticias")> 
108	            <#assign instanceId = mainDomainInstanceId> 
109	 			 
110	 			<#-- Configure url and asset publisher instance id with customFields--> 
111	 			<#-- By default configured with main domain news page and asset publisher id. Other domains have to configure it manually in the site configuration --> 
112				<#if site_news_url_value??> 
113					<#assign urlNews = site_news_url_value> 				 
114				</#if> 
115				<#if site_news_asset_publisher_instance_id??> 
116					<#assign instanceId = site_news_asset_publisher_instance_id> 				 
117				</#if> 
118				 
119	            <#-- WORKAROUND FOR TEMPORAL SITES GO LIVE --> 
120				<#-- lfr.cloud domain urls work differently, redirection to site news has to be adapted for it--> 
121				<#if actualURLFriendly?contains("lfr.cloud")> 
122					<#-- 1. Site with default news page. if using the default value, redirect to main site and use mainDomainInstanceId.--> 
123					<#if site_news_url_default_value == site_news_url_value> 
124						<#assign urlNews = site_news_url_value> 
125						<#assign instanceId = mainDomainInstanceId> 
126					<#else> 
127						<#-- 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--> 
128						<#if site_news_url_value?contains("/web"+groupFriendlyURL)> 
129							<#assign urlNews = site_news_url_value> 
130							<#assign instanceId = originalInstanceId> 
131							 
132						<#-- 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--> 
133						<#else> 
134							<#assign urlNews = "/web"+groupFriendlyURL + site_news_url_value> 
135							<#assign instanceId = originalInstanceId> 
136						</#if> 
137					</#if> 
138				</#if> 
139				 
140	            <#assign urlDetail = urlNews+"/-/contents/"+contentFechaURLString+"/"+tituloNoticiaEncoded+"/content/"+instanceId+"/"+curEntry.getEntryId()> 
141	             
142                <#if validator.isNotNull(video)> 
143                    <#assign foto = "http://img.youtube.com/vi/"+video+"/0.jpg"> 
144                <#else> 
145                    <#if jsonObjectString?? && jsonObjectString?has_content> 
146                        <#attempt> 
147                            <#assign jsonObject = jsonObjectString?eval> 
148                            <#assign entryUuid = jsonObject.uuid /> 
149                            <#assign entryGroupId = getterUtil.getLong(jsonObject.groupId) /> 
150                            <#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(entryUuid, entryGroupId) /> 
151                            <#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", dlFileEntry.fileEntryId) /> 
152                            <#assign assetRenderer = assetEntry.assetRenderer /> 
153                            <#assign foto = assetRenderer.getURLDownload(themeDisplay) /> 
154                        <#recover> 
155                            <#assign foto = "" /> 
156                        </#attempt> 
157                    </#if> 
158                </#if> 
159                <a id="${idNoticia}" class="col-xs-12 col-md-4 noticia-secundaria" href="${urlDetail}" alt="" title=""> 
160                    <div class="col-xs-12 panel panel panel-default"> 
161                        <div class="col-xs-12 col-sm-6 col-md-12 img-responsive noticia-img" style="background:url(${foto}) no-repeat"></div> 
162                        <div class="col-xs-12 col-sm-6 col-md-12 panel-body"> 
163                            <p class="fecha">${dateUtil.getDate(dateToUse, dateFormat, locale)}</p> 
164                            <h3 class="titulo"> 
165                                <#if (tituloNoticia?length > 200)> 
166                                    ${tituloNoticia[0..199]} 
167                                <#else> 
168                                    ${tituloNoticia} 
169                                </#if> 
170                            </h3> 
171                            <p class="visible-md visible-lg entradilla"> 
172                                <#if (entradilla?length > 135)> 
173                                    ${entradilla[0..134]} 
174                                <#else> 
175                                    ${entradilla} 
176                                </#if> 
177                            </p> 
178                        </div> 
179                        <p class="col-xs-12 col-sm-6 col-sm-offset-6 col-md-12 col-md-offset-0 enlace"> 
180                            <span href="${urlDetail}">${readMore}</span> 
181                        </p> 
182                    </div> 
183                </a> 
184            <#if validator.isNotNull(video)> 
185                <!-- Modal de video --> 
186                <div class="modal fade modal-unav" id="noticia_${idNoticia}_modal_video" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true"> 
187                    <div class="modal-dialog" role="document"> 
188                        <div class="modal-content"> 
189                            <div class="modal-body"> 
190                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
191                                    <span aria-hidden="true">&times;</span> 
192                                </button> 
193                                <div class="embed-responsive embed-responsive-16by9"> 
194                                    <iframe class="embed-responsive-item" src="" id="noticia_${idNoticia}_video_iframe"  allowscriptaccess="always" allow="autoplay"></iframe> 
195                                </div> 
196                            </div> 
197                        </div> 
198                    </div> 
199                </div> 
200                <script> 
201                    $(document).ready(function() { 
202                        var $videoSrc; 
203                        $('#${idNoticia}.modal_opener').click(function(e) { 
204                            e.preventDefault(); 
205                            $videoSrc = $(this).getData()( "src" ); 
206                            $("#noticia_${idNoticia}_video_iframe").attr('src',$videoSrc + "?autoplay=1&amp;modestbranding=1&amp;showinfo=0" ); 
207                        }); 
208                        $('#noticia_${idNoticia}_modal_video button').click(function(e) { 
209                            $("#noticia_${idNoticia}_video_iframe").attr('src', ''); 
210                        }); 
211                    }); 
212                </script> 
213            </#if> 
214            </#list> 
215        </div> 
216    </div> 
217</#if> 
218<#function friendlyUrlDecode title> 
219    <#assign titleFriendly = title?replace("[^A-Za-z0-9À-ú ]", "", "r")?lower_case> 
220    <#assign titleFriendly = titleFriendly?replace("á", "a", "r")> 
221    <#assign titleFriendly = titleFriendly?replace("é", "e", "r")> 
222    <#assign titleFriendly = titleFriendly?replace("í", "i", "r")> 
223    <#assign titleFriendly = titleFriendly?replace("ó", "o", "r")> 
224    <#assign titleFriendly = titleFriendly?replace("ú", "u", "r")> 
225    <#assign titleFriendly = titleFriendly?replace("ñ", "n", "r")> 
226    <#assign titleFriendly = URLEncoder.encode(titleFriendly)> 
227    <#assign titleFriendly = titleFriendly?replace("\\+", "-","r")> 
228    <#return titleFriendly> 
229</#function> 

enlaces-sobre-el-blog

enlaces-sobre-el-autor