Publicador de contenidos

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> journalArticleLocalService.fetchLatestArticle(curEntry.getClassPK())  [in template "10136#10174#29238558" at line 33, 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#29238558" at line 33, 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 currentPageUrl = PortalUtil.getLayoutURL(themeDisplay.getLayout(),themeDisplay)> 
29 
30<section class="unav-news-list"> 
31    <#if entries?has_content> 
32    	<#list entries as curEntry> 
33    		<#assign article = journalArticleLocalService.fetchLatestArticle(curEntry.getClassPK()) /> 
34    		<#assign assetRendererDate = curEntry.getAssetRenderer() /> 
35            <#assign contentFecha = assetRendererDate.getDisplayDate()?date /> 
36            <#assign contentFechaURLString = contentFecha?date?string["dd/MM/yyyy"] /> 
37            <#assign contentFechaString = contentFecha?date?string["dd | MM | yyyy"] /> 
38 
39    		 <#assign aArticleXML = saxReaderUtil.read(article.getContentByLocale(locale)) /> 
40    		 <#assign tituloNoticia = aArticleXML.valueOf("//dynamic-element[@name='Titulo_noticia']/dynamic-content/text()") /> 
41    		 <#assign autorNombre = aArticleXML.valueOf("//dynamic-element[@name='Nombre_autor']/dynamic-content/text()") /> 
42    		 <#assign autorImagen = aArticleXML.valueOf("//dynamic-element[@name='Autor_imagen']/dynamic-content/text()") /> 
43    		 <#assign jsonObjectString = aArticleXML.valueOf("//dynamic-element[@name='Imagen']/dynamic-content/text()") /> 
44    		  
45    		 <#assign video = aArticleXML.valueOf("//dynamic-element[@name='Video_youtube']/dynamic-content/text()") /> 
46    		  
47    		 <#assign friendlyContentURL = assetPublisherHelper.getAssetViewURL(portalUtil.getLiferayPortletRequest(renderRequest), portalUtil.getLiferayPortletResponse(renderResponse), curEntry,true) /> 
48 
49            <#assign tituloNoticiaEncoded = friendlyUrlDecode(tituloNoticia)> 
50    		  
51            <#-- Urls generated always the same page for unav requirements --> 
52            <#assign urlNews = languageUtil.get(locale, "url.news.details", "/noticias")> 
53            <#assign instanceId = "lovPblW1fC70"> 
54 
55            <#-- WORKAROUND FOR TEMPORAL SITES GO LIVE --> 
56 
57            <#if scopeGroupId = 11140003> 
58                 
59                 <#assign urlNews =  "/unidad-de-cultura-cientifica/noticias"> 
60                <#if actualURLFriendly?contains("lfr.cloud")> 
61                 <#assign urlNews = "/web"+groupFriendlyURL + "/unidad-de-cultura-cientifica/noticias"> 
62                 </#if> 
63                 
64                 <#assign instanceId = "yhapDUuDh4hp"> 
65            </#if> 
66            <#if scopeGroupId = 5284696> 
67                <#if actualURLFriendly?contains("lfr.cloud")> 
68                 <#assign urlNews = "/web"+groupFriendlyURL + "/noticias"> 
69                 </#if>  
70                 <#assign instanceId = "J0z0CEIllYkO"> 
71            </#if> 
72            <#if scopeGroupId = 18305454> 
73                <#if actualURLFriendly?contains("lfr.cloud")> 
74                 <#assign urlNews = "/web"+groupFriendlyURL + "/noticias"> 
75                 </#if>  
76                 <#assign instanceId = "LafHSsNmQzOW"> 
77            </#if> 
78            <#if scopeGroupId = 24729411> 
79                <#if actualURLFriendly?contains("lfr.cloud")> 
80                 <#assign urlNews = "/web"+groupFriendlyURL + "/news"> 
81                 </#if>  
82                 <#assign instanceId = "X6fAQfzqF5af"> 
83            </#if> 
84            <#if scopeGroupId = 31657203> 
85                <#if actualURLFriendly?contains("lfr.cloud")> 
86                 <#assign urlNews = "/web"+groupFriendlyURL + "/noticias"> 
87                 </#if>  
88                 <#assign instanceId = "ja3fYkrbU86Q"> 
89            </#if> 
90            <#if scopeGroupId = 24233193> 
91                <#if actualURLFriendly?contains("lfr.cloud")> 
92                 <#assign urlNews = "/web"+groupFriendlyURL + "/sala-de-prensa/noticias-y-eventos"> 
93                 </#if>  
94                 <#assign instanceId = "1tZ9oin6Nj8k"> 
95            </#if> 
96            <#if scopeGroupId = 23796512> 
97                <#if actualURLFriendly?contains("lfr.cloud")> 
98                 <#assign urlNews = "/web"+groupFriendlyURL + "/noticias"> 
99                 </#if>  
100                 <#assign instanceId = "jlsoUQnQ3VKq"> 
101            </#if> 
102            <#if scopeGroupId = 20757644> 
103                <#if actualURLFriendly?contains("lfr.cloud")> 
104                 <#assign urlNews = "/web"+groupFriendlyURL + "/noticias"> 
105                 </#if>  
106                 <#assign instanceId = "Hy05yqXifLyo"> 
107            </#if> 
108            <#if scopeGroupId = 19239240> 
109                <#if actualURLFriendly?contains("lfr.cloud")> 
110                 <#assign urlNews = "/web"+groupFriendlyURL + "/noticias"> 
111                 </#if>  
112                 <#assign instanceId = "4CDvZCujBWZJ"> 
113            </#if> 
114            <#if scopeGroupId = 25489263> 
115                <#if actualURLFriendly?contains("lfr.cloud")> 
116                 <#assign urlNews = "/web"+groupFriendlyURL + "/noticias"> 
117                 </#if>  
118                 <#assign instanceId = "Hk7OgfYuivNX"> 
119            </#if> 
120            <#if scopeGroupId = 5318873> 
121                <#if actualURLFriendly?contains("lfr.cloud")> 
122                 <#assign urlNews = "/web"+groupFriendlyURL + "/el-museo/noticias"> 
123                </#if>  
124                 <#assign instanceId = "Hw8G"> 
125            </#if> 
126            <#assign urlDetail = urlNews+"/-/contents/"+contentFechaURLString+"/"+tituloNoticiaEncoded+"/content/"+instanceId+"/"+curEntry.getEntryId()> 
127             
128<#assign foto = "" > 
129            <a href="${urlDetail}" class="unav-news-list__item"> 
130    		 
131    		  <#if jsonObjectString??> 
132    		         <#attempt> 
133                        <#assign jsonObject = jsonObjectString?eval> 
134                        <#assign entryUuid = jsonObject.uuid /> 
135                        <#assign entryGroupId = getterUtil.getLong(jsonObject.groupId) /> 
136                        <#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(entryUuid, entryGroupId) /> 
137                        <#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", dlFileEntry.fileEntryId) /> 
138                        <#assign assetRenderer = assetEntry.assetRenderer /> 
139                        <#assign foto = assetRenderer.getURLDownload(themeDisplay) /> 
140                         
141            	        <div class="unav-news-list__img" style="background-image: url('${foto});">&nbsp;</div> 
142                    <#recover> 
143                       
144                    </#attempt> 
145                  </#if>     
146                 <#if video?has_content> 
147                    <#if foto == "">  
148                          
149						<div class="unav-news-list__img" style="background-image:url(http://img.youtube.com/vi/${video}/0.jpg)">&nbsp; 
150						</div>        
151					</#if> 
152                  </#if> 
153                   
154                    <div class="unav-news-list__container-txt"> 
155                        <p class="unav__text__date">${contentFechaString}</p> 
156                         
157                        <p class="unav__text unav__text--m">${tituloNoticia}</p> 
158                     
159                        <div class="unav-news-list__info"> 
160                            <#if autorNombre?has_content> 
161                                <p class="unav-writing__info-txt"><span class="unav-writing__info-bold">${texto}</span>${autorNombre}</p> 
162                            </#if> 
163                            <#if autorImagen?has_content> 
164                                <p class="unav-writing__info-txt"><span class="unav-writing__info-bold">${imagen}</span>${autorImagen}</p> 
165                            </#if> 
166                        </div> 
167                    </div> 
168            </a> 
169    	</#list> 
170    </#if> 
171 
172     
173</section> 
174 
175 
176<#function friendlyUrlDecode title> 
177 
178    <#assign titleFriendly = title?replace("[^A-Za-z0-9À-ú ]", "", "r")?lower_case> 
179    <#assign titleFriendly = titleFriendly?replace("á", "a", "r")> 
180    <#assign titleFriendly = titleFriendly?replace("é", "e", "r")> 
181    <#assign titleFriendly = titleFriendly?replace("í", "i", "r")> 
182    <#assign titleFriendly = titleFriendly?replace("ó", "o", "r")> 
183    <#assign titleFriendly = titleFriendly?replace("ú", "u", "r")> 
184    <#assign titleFriendly = titleFriendly?replace("ñ", "n", "r")> 
185    <#assign titleFriendly = URLEncoder.encode(titleFriendly)> 
186    <#assign titleFriendly = titleFriendly?replace("\\+", "-","r")> 
187    <#return titleFriendly> 
188</#function> 

REDES SOCIALES