Navegación por categorías

Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy67.getAssetCategory(long)" threw an exception when invoked on com.sun.proxy.$Proxy67 object "com.liferay.asset.categories.internal.service.AssetCategoryPropertyAssetCategoryLocalServiceWrapper@2e223e77"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: category = assetCategoryService.getAs...  [in template "217051#217099#573763" at line 49, column 22]
	- Reached through: #assign-container  [in template "217051#217099#573763" at line 49, column 13]
----
1<#assign assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
2		 assetCategoryPropertyService =  serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService") 
3		 SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"] 
4		 HtmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"] 
5		 layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") 
6		 PortletURLFactoryUtil = staticUtil["com.liferay.portal.kernel.portlet.PortletURLFactoryUtil"] 
7		 PortletRequest = staticUtil["javax.portlet.PortletRequest"]     
8		 journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")   
9		 ParamUtil = staticUtil["com.liferay.portal.kernel.util.ParamUtil"]              
10         categoryId = ParamUtil.getLong(request,"categoryId", 0) 
11         title =  ParamUtil.getString(request,"title", "") 
12         maxLoop = 100          
13         imageId = ParamUtil.getString(request,"imageId","")          
14/> 
15 
16<#if (categoryId <= 0) > 
17	<#assign categoryId = ParamUtil.getLong(renderRequest,"categoryId", 0)/> 
18</#if> 
19 
20<#if (categoryId <= 0) > 
21    <#if entries?has_content> 
22		<#foreach aCategory in entries?first.getCategories()> 
23			<#assign aCategory = aCategory/> 
24			<#break> 
25		</#foreach> 
26		<#list 1..maxLoop as i> 
27			<#list 1..maxLoop as j> 
28				<#if aCategory.getParentCategory()?has_content> 
29					<#assign aCategory = aCategory.getParentCategory()/> 
30				<#else> 
31					<#assign categoryId = aCategory.getCategoryId()/> 
32			   </#if>   
33			   <#break> 
34			</#list> 
35			<#if (categoryId > 0) > 
36				<#break> 
37			</#if> 
38		</#list> 
39	 </#if> 
40</#if> 
41 
42 
43<nav aria-label="breadcrumb"> 
44    <ol class="breadcrumb"> 
45       <li class="breadcrumb-title"><span>${languageUtil.get(locale,"webasturias.breadcrumb-title")}</span></li> 
46       <#--<li class="breadcrumb-item"><a href="/">${languageUtil.get(locale,"webasturias.breadcrumb-asturias")}</a></li>-->         
47        <#if (categoryId > 0) > 
48 
49            <#assign category = assetCategoryService.getAssetCategory(categoryId) 
50                     categoryAncestors = category.getAncestors() 
51                     breadCrumbContent = ""/> 
52                      
53            <#if categoryAncestors?has_content> 
54                <#foreach categoryAncestor in categoryAncestors> 
55                	 
56                	<#assign hideCategory = false/> 
57                	 
58                	<#-- obtener el contenido de la categoría hija --> 
59                	<#assign contentId = (assetCategoryPropertyService.fetchCategoryProperty(categoryAncestor.getCategoryId(), "idContenido").getValue())!""/> 
60					<#if contentId ? has_content>			         
61		            	<#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
62		        		 
63		        		<#if journalArticleSub?has_content> 
64			        		<#-- obtener el contenido de la categoría actual --> 
65			                <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
66                    		 	pageDetailNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content") 
67                    		 	/> 
68                    		 <#if document.selectSingleNode("/root/dynamic-element[@name='visibleMigas']/dynamic-content")?has_content> 
69                    		 	<#assign visibleMigasNode =  document.selectSingleNode("/root/dynamic-element[@name='visibleMigas']/dynamic-content")  
70                    		 			 visibleMigas =  visibleMigasNode.getText() 
71                    		 			 hideCategory = visibleMigas != "1"/> 
72                    		 </#if> 
73			        	</#if>		 	      		    	  
74			    	  
75				    	 <#if pageDetailNode?has_content && pageDetailNode.getText()?has_content> 
76			        		<#assign  pageDetail = pageDetailNode.getText()/> 
77			        		<#if (pageDetail?index_of("@")>0)> 
78		                		<#assign pageDetailPosition = (pageDetail?index_of("@")-1) 
79		                         	pageDetail = pageDetail[0..pageDetailPosition] 
80		                          	layoutDetail = layoutLocalService.getLayout(themeDisplay.getScopeGroupId(),false,pageDetail?number) 
81		                      	/> 
82		                	</#if> 
83			            <#else> 
84			            	<#assign detailPage = "general" 
85			            	 		 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
86			            </#if> 
87			             
88			            <#assign categoryUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)    /> 
89	                    ${categoryUrl.setParameter("categoryId",categoryAncestor.getCategoryId()+"")} 
90	                 
91	                	<#if !(hideCategory?has_content && hideCategory)> 
92	                		<#if categoryAncestor.isRootCategory()> 
93		                		<#assign breadCrumbContent = "<li class='breadcrumb-item'><a href='"+categoryUrl+"'>"+categoryAncestor.getTitle(locale)+" </a> </li>"+breadCrumbContent/> 
94		                	<#else> 
95		                    	<#assign breadCrumbContent = "<li class='breadcrumb-item'><a href='"+categoryUrl+"'>"+categoryAncestor.getTitle(locale)+" </a> </li>"+breadCrumbContent/> 
96		                    </#if>	                   		 
97	                   	</#if> 
98                	</#if> 
99                </#foreach> 
100                 
101                ${breadCrumbContent} 
102                 
103            </#if> 
104             
105            <#assign hideCategory = false/> 
106            <#assign contentId = (assetCategoryPropertyService.fetchCategoryProperty(category.getCategoryId(), "idContenido").getValue())!""/> 
107			<#if contentId ? has_content>	 
108            	<#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
109        		 
110        		<#if journalArticleSub?has_content> 
111	        		<#-- obtener el contenido de la categoría actual --> 
112	                <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
113            		 	pageDetailNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content") 
114            		 	/> 
115            		 <#if document.selectSingleNode("/root/dynamic-element[@name='visibleMigas']/dynamic-content")?has_content> 
116            		 	<#assign visibleMigasNode =  document.selectSingleNode("/root/dynamic-element[@name='visibleMigas']/dynamic-content")  
117            		 			 visibleMigas =  visibleMigasNode.getText() 
118            		 			 hideCategory = visibleMigas != "1"/> 
119            		 </#if> 
120	        	</#if>  	  
121	    	  
122		    	<#if pageDetailNode?has_content && pageDetailNode.getText()?has_content> 
123	        		<#assign  pageDetail = pageDetailNode.getText()/> 
124	        		<#if (pageDetail?index_of("@")>0)> 
125                		<#assign pageDetailPosition = (pageDetail?index_of("@")-1) 
126                         	pageDetail = pageDetail[0..pageDetailPosition] 
127                          	layoutDetail = layoutLocalService.getLayout(themeDisplay.getScopeGroupId(),false,pageDetail?number) 
128                      	/> 
129                	</#if> 
130	            <#else> 
131	            	<#if category.isRootCategory()> 
132	            		<#assign detailPage = "inicio"/> 
133	            	<#else> 
134	            		<#assign detailPage = "general"/> 
135	            	</#if> 
136	            	 
137	            	<#assign layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
138	            </#if> 
139	             
140	            <#assign categoryUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)    /> 
141                ${categoryUrl.setParameter("categoryId",category.getCategoryId()+"")} 
142             
143            	<#if !(hideCategory?has_content && hideCategory)> 
144            		<#if category.isRootCategory()> 
145                		<#if title?has_content> 
146                			<li class="breadcrumb-item"><a href="/inicio">${category.getTitle(locale)}</a></li>		                		 
147                		<#else> 
148                			<li class="breadcrumb-item active">${category.getTitle(locale)}</li> 
149                		</#if>  
150                	<#else> 
151                    	<#if title?has_content> 
152                			<li class="breadcrumb-item"><a href="${categoryUrl}<#if imageId ? has_content>?imageId=${imageId}&title=${HtmlUtil.escapeURL(category.getTitle(locale))}</#if>">${category.getTitle(locale)}</a></li>		                		 
153                		<#else> 
154                			<li class="breadcrumb-item active">${category.getTitle(locale)}</li> 
155                		</#if>  
156                    </#if>	                		               		 
157               	</#if> 
158        	</#if> 
159        </#if> 
160        <#if title ? has_content> 
161        	<li class="breadcrumb-item active">${title}</li>  
162        </#if> 
163    </ol> 
164</nav> 
165 
166<script type="text/javascript"> 
167	$( document ).ready(function() { 
168		 if(typeof ga !== "undefined") { 
169		 <#if title ? has_content> 
170		 	var pageName = '${title}'; 
171		 <#elseif category ? has_content> 
172		 	var pageName = '${category.getName()}'; 
173		 <#else> 
174		 	var pageName = location.pathname; 
175		 </#if> 
176			     ga( 'send', 'pageview', { 
177				    'page': pageName, 
178				    'title': pageName 
179				} ); 
180
181	}); 
182</script> 

Navegación por categorías

Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy67.getAssetCategory(long)" threw an exception when invoked on com.sun.proxy.$Proxy67 object "com.liferay.asset.categories.internal.service.AssetCategoryPropertyAssetCategoryLocalServiceWrapper@2e223e77"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign currentCategory = assetCatego...  [in template "217051#217099#573731" at line 40, column 10]
----
1<#assign assetCategoriesCustomService = serviceLocator.findService("pa.mtl.assetcategories.service.api.AssetCategoriesServiceApi") 
2		 assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
3		 assetCategoryPropertyService =  serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService") 
4		 SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"] 
5		 HtmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"] 
6		 layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") 
7		 PortletURLFactoryUtil = staticUtil["com.liferay.portal.kernel.portlet.PortletURLFactoryUtil"] 
8		 PortletRequest = staticUtil["javax.portlet.PortletRequest"]     
9		 journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
10		 ParamUtil = staticUtil["com.liferay.portal.kernel.util.ParamUtil"]   
11		 categoryId =ParamUtil.getLong(renderRequest,"categoryId", 0) 
12		 categoryName = ParamUtil.getString(request,"categoryName", "") 
13		  maxLoop = 100   
14/> 
15 
16<#-- inicialización de categoría: si no hay seleccionada se coge la primera de la jerarquía --> 
17<#if (categoryId <= 0) > 
18    <#if categoryName?has_content> 
19    	<#assign currentCategory = assetCategoriesCustomService.findCategoryByName(categoryName, groupId) 
20    			 categoryId = currentCategory.getCategoryId()/> 
21    <#else>     
22	    <#if entries?has_content> 
23	        <#foreach vocabulary in entries>	         
24	            <#foreach aCategory in vocabulary.getCategories()> 
25	                <#list 1..maxLoop as i> 
26	                    <#if aCategory.getParentCategory()?has_content> 
27	                        <#assign aCategory = aCategory.getParentCategory()/> 
28	                    <#else> 
29	                        <#assign categoryId = aCategory.getCategoryId()/> 
30	                        <#break>  
31	                   </#if>   
32	                </#list> 
33	            </#foreach>	             
34	        </#foreach> 
35	    </#if> 
36	</#if>     
37</#if> 
38 
39<#if ! currentCategory ? has_content > 
40	 <#assign currentCategory = assetCategoryService.getAssetCategory(categoryId)/> 
41</#if> 
42 
43<#assign childCategories = assetCategoriesCustomService.getChildCategoriesOrdered(categoryId,locale) 
44         showContents = true 
45         forceShowCategories = false 
46/> 
47 
48<#assign structureArticulo = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ARTICULO") />  
49 
50<#-- Pintar subcategorías --> 
51<#if childCategories?has_content>			 
52	 <div class="card flex-md-row mb-4 box-shadow h-md-250"> 
53        <div class="card-body d-flex flex-column align-items-start listado-categorias">   
54			<#assign hay_contenido_cat = 0 /> 						              	 
55			<#list childCategories as childCategory> 
56				<#assign contentId = (assetCategoryPropertyService.fetchCategoryProperty(childCategory.getCategoryId(), "idContenido").getValue())!""/> 
57				<#if contentId ? has_content>	 
58					<#assign hay_contenido_cat = hay_contenido_cat + 1 />								 
59				</#if> 
60			</#list>  
61			 
62			<#if hay_contenido_cat gt 0 > 
63				${portalUtil.setPageTitle(currentCategory.getTitle(locale), request)} 
64				<h2 class="mb-0">${currentCategory.getTitle(locale)}</h2>      
65		  		<#list childCategories as childCategory>	 
66		  			<#assign contentId = (assetCategoryPropertyService.fetchCategoryProperty(childCategory.getCategoryId(), "idContenido").getValue())!""/> 
67					<#if contentId ? has_content>	  							 
68	                    <#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/>	                     
69	                    <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
70							paginaDetalleNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content")	 
71						/> 
72	 
73						<#if paginaDetalleNode?has_content && paginaDetalleNode.getText()?has_content> 
74							<#assign  pageDetail = paginaDetalleNode.getText()/> 
75							<#if (pageDetail?index_of("@")>0)> 
76								<#assign pageDetailPosition = (pageDetail?index_of("@")-1) 
77	 								pageDetail = pageDetail[0..pageDetailPosition] 
78	 								layoutDetail = layoutLocalService.getLayout(themeDisplay.getScopeGroupId(),false,pageDetail?number)		 
79								/> 
80							</#if> 
81						<#else> 
82	                        <#assign detailPage = "general" 
83	                                 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
84						</#if> 
85							 
86						<#assign categoryUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)/> 
87						${categoryUrl.setParameter("categoryId", childCategory.getCategoryId()+"")}															 
88	 
89	                    <#if journalArticleSub?has_content>   	                    																 
90							<#-- Pintamos los contenidos relacionados con la categoría actual -->				                        	 
91							<#assign journalArticles = assetCategoriesCustomService.findJournalArticlesElasticSearchByCategoryId(childCategory.getCategoryId(), groupId, portalUtil.getCompanyId(request), structureArticulo.getStructureId(), locale,"fecha", "desc")/>      
92							 
93				            <#if journalArticles?has_content>  
94				            	<#assign contenidoImagen = journalArticleService.getArticleContent(journalArticleSub, "TPL_CATEGORIA_IMG_ACCESO","VIEW", locale, themeDisplay)/> 
95 
96		                        <#-- obtener el contenido de la categoría actual -->	 
97		 						<div class="categoria-asociada"> 
98		                            <div class="row"> 
99		                                <div class="col-md-2 categoria-imagen"> 
100		                                    ${contenidoImagen} 
101		                                </div> 
102		                                <div class="col-md-10"> 
103		                                    <h3 class="title">${childCategory.getTitle(locale)}</h3>  
104		                                     
105		                                    <#-- si hay categorias hijas las mostramos -->	                                     
106		                                	<#assign grandchildCategories = assetCategoriesCustomService.getChildCategoriesOrdered(childCategory.getCategoryId(),locale) 
107											         showContents = true 
108											         forceShowCategories = false 
109											/> 
110											<div class="row col-md-12">					            	  								 
111												<#assign contador = 0 /> 
112									           	<#list journalArticles as journalArticle>								            
113									            	<#assign document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale))									                      
114										                     currentUrl = renderResponse.createRenderURL() 
115										                     detailPage = "detalle" 
116									                     	 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) 
117									             			 detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE) 
118									             			 titulo=""   
119									             			 tipo=""   
120									             			 resumen=""	           			  
121									     			/>     			      	  	      			      	  
122													 
123													<#if document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
124														<#assign tituloNode = document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") 
125												         	 titulo = tituloNode.getText() 
126											     		/>										     		 
127											      	</#if>	 
128											      	<#if document.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") ? has_content> 
129														<#assign tipoNode = document.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") 
130												         	 tipo = tipoNode.getText() 
131											     		/>										     		 
132											      	</#if>		 
133											      	<#if document.selectSingleNode("/root/dynamic-element[@name='resumen']/dynamic-content") ? has_content> 
134														<#assign resumenNode = document.selectSingleNode("/root/dynamic-element[@name='resumen']/dynamic-content") 
135															 resumen = resumenNode.getText() 
136														/>										     		 
137													</#if>	    								      			 
138					      	      	  
139													${currentUrl.setParameter("categoryId",categoryId+"")} 
140													${detailUrl.setParameter("categoryId",childCategory.getCategoryId()+"")} 
141													${detailUrl.setParameter("articleId", journalArticle.getArticleId())} 
142																																																			 
143													<div class="col-md-6 articulo-relacionado">	 
144								                  	    <#if tipo == "ext">       
145								                  	    	<#assign articleContent = journalArticleService.getArticleContent(journalArticle, "TPL_ARTICULO_EXTERNO", "VIEW", locale, themeDisplay)/> 
146								                  	    	${articleContent}     
147								                  		<#elseif tipo == "list" >							                  			 
148								                  			<h4 class="title">${titulo}</h4> 
149								                  			<#if resumen != ""> 
150																<div class="summary tipo-list">${resumen} </div>											 
151															</#if> 
152															 
153								                  			<#assign articulosRelacionadosNode =  document.selectNodes("/root/dynamic-element[@name='articulosRelacionados']/dynamic-content")   /> 
154								                  			<#assign contadorArticulosRel = 0/> 
155															<#if articulosRelacionadosNode?size gt 0> 
156															<#if articulosRelacionadosNode[0].getText()?has_content> 
157								                  				<ul> 
158										                            <#list articulosRelacionadosNode as articuloRelacionado> 
159										                                <#if articuloRelacionado?has_content && articuloRelacionado.getText() ? has_content> 
160									                                        <#assign articuloRelacionadoJSONObject = jsonFactoryUtil.createJSONObject(articuloRelacionado.getText()) />                                             
161									                                        <#if articuloRelacionadoJSONObject.get("classPK")?has_content> 
162									                                            <#assign articuloRelacionadoClassPk = articuloRelacionadoJSONObject.get("classPK") /> 
163									                                            <#assign journalArticleList = journalArticleService.fetchLatestArticle(articuloRelacionadoClassPk?number)  
164									                                                    currentUrlList = renderResponse.createRenderURL()								                  
165									                                                    documentArticleList = SAXReaderUtil.read(journalArticleList.getContentByLocale(locale))     
166									                                                    tituloArticulo = "" 
167									                                                    tipoArticulo = "" 
168									                                                    enlaceExternoArticulo = "" 
169									                                            />								                             
170									                            
171									                                            <#if documentArticleList.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
172									                                                <#assign tituloArticuloNode = documentArticleList.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") 
173									                                                    tituloArticulo = tituloArticuloNode.getText() 
174									                                                    /> 
175									                                            </#if>										                                                           			 
176									                                             <#if documentArticleList.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") ? has_content> 
177									                                                <#assign tipoArticuloNode = documentArticleList.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") 
178									                                                    tipoArticulo = tipoArticuloNode.getText() 
179									                                                    /> 
180									                                            </#if>											                                             
181								                                                <#assign detailPage = "detalle" 
182								                                                    layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) 
183								                                                    detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE) 
184								                                                />      
185								                                                  							                                                
186																				${detailUrl.setParameter("categoryId",childCategory.getCategoryId()+"")}	 
187								                                                ${detailUrl.setParameter("articleId", journalArticleList.getArticleId())} 
188								                                                 
189								                                                <#if tipoArticulo == "ext">      
190								                                                	<#if documentArticleList.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']/dynamic-content") ? has_content> 
191										                                                <#assign enlaceExternoArticuloNode = documentArticleList.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']/dynamic-content") 
192										                                                    enlaceExternoArticulo = enlaceExternoArticuloNode.getText() 
193										                                                    /> 
194										                                            </#if>						                                              
195														                  	    	<li> 
196									                                                    <a href="${enlaceExternoArticulo}" target="_blank"  
197									                                                    title="${languageUtil.get(locale,'webasturias.general.external-link')} ${tituloArticulo}">${tituloArticulo}</a>  
198									                                                </li>  
199														                  	    <#else>  
200										                                            <li> 
201									                                                    <a href="${detailUrl}&articleId=${journalArticleList.getArticleId()}&title=${HtmlUtil.escapeURL(tituloArticulo)}&redirect=${HtmlUtil.escapeURL(currentUrlList)}" 
202									                                                    title="${languageUtil.get(locale,'webasturias.general.more-info-sobre')} ${tituloArticulo}">${tituloArticulo}</a>  
203									                                                </li> 
204									                                            </#if>   		  
205									                                        </#if> 
206									                                    </#if> 
207										                               <#assign contadorArticulosRel = contadorArticulosRel +1 /> 													 
208																			<#if contadorArticulosRel gte 2> 
209																				<#break> 
210																			</#if> 
211										                            </#list> 
212																	<#if articulosRelacionadosNode?size gt 3> 
213																		<div class="col-md-12">	 
214																			<div class="link-more"> 
215																				<a class="more-information" title="${languageUtil.get(locale,'webasturias.general.more-info-about')} ${titulo}" 
216																				href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(titulo)}&redirect=${HtmlUtil.escapeURL(currentUrl)}">${languageUtil.get(locale,'webasturias.general.more-info')}</a> 
217																			</div>	 
218																		</div> 
219																	</#if>		 
220									                            </ul> 
221									                            <div class="link-more"> 
222																	<a class="more-information" title="${languageUtil.get(locale,'webasturias.general.more-info-about')} ${titulo}" 
223																		href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(titulo)}&redirect=${HtmlUtil.escapeURL(currentUrl)}">${languageUtil.get(locale,'webasturias.general.more-info')}</a> 
224																</div>	 
225								                  			</#if> 
226															</#if> 
227								                  		<#else> 
228								                  			<#assign articleContent = journalArticleService.getArticleContent(journalArticle, "TPL_ARTICULO_LISTADO", "VIEW", locale, themeDisplay)/> 
229								                  	    	${articleContent}    
230								                  			<div class="link-more"> 
231									                      		<a class="more-information" title="${languageUtil.get(locale,'webasturias.general.more-info-about')} ${titulo}" 
232									                      			href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(titulo)}&redirect=${HtmlUtil.escapeURL(currentUrl)}">${languageUtil.get(locale,'webasturias.general.more-info')}</a> 
233									                  		</div>	 
234								                  		</#if>							                    
235								              		</div>  
236								              		<#assign contador = contador +1 /> 													 
237													<#if contador == 4> 
238												    	<#break> 
239												  	</#if> 
240									        	</#list> 	    
241					 
242									        	<#-- Cuando hay más de 4 mostramos el enlace --> 
243									        	<#if journalArticles?size gt 4> 
244													<div class="col-md-12">	 
245														<div class="link-more"> 
246					                               			<a class="more-information" title="${languageUtil.get(locale,'webasturias.general.more-info-about')} ${childCategory.getTitle(locale)}" 
247					                               				href="${categoryUrl}" >${languageUtil.get(locale,'webasturias.general.more-info-about')} ${childCategory.getTitle(locale)}</a> 
248					                               		</div>	 
249					                               </div> 
250					                            </#if>		 
251					                       </div><#-- row col-md-12 -->                                   
252		                                </div><#-- col-md-10 --> 
253		                            </div><#-- row --> 
254		                        </div><#-- categoria-asociada -->   		                        
255	                        </#if>	                     
256	                    </#if> 	                     
257	                </#if>   
258	        	</#list> 
259	        <#elseif hay_contenido_cat == 0  > 
260				${portalUtil.setPageTitle(currentCategory.getTitle(locale), request)} 
261	          	<h2 class="mb-0">${currentCategory.getTitle(locale)}</h2>   
262	          	<#assign contentId = (assetCategoryPropertyService.fetchCategoryProperty(currentCategory.getCategoryId(), "idContenido").getValue())!""/> 
263				<#if contentId ? has_content>              	 
264	                <#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/>                     
265	                <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
266						paginaDetalleNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content")	                     
267	                    descripcionNode = document.selectSingleNode("/root/dynamic-element[@name='descripcion']/dynamic-content") 
268	                 	descripcion = HtmlUtil.stripHtml(descripcionNode.getText()) 
269					/> 
270					<#assign contenidoImagen = journalArticleService.getArticleContent(journalArticleSub, "TPL_CATEGORIA_IMG_ACCESO","VIEW", locale, themeDisplay)/> 
271					<div class="categoria-asociada"> 
272						<div class="row">   
273	              			<div class="col-md-2 categoria-imagen">                          			 
274	                        	${contenidoImagen}                               	             
275	                    	</div> 
276	                    	<div class="col-md-10">	                            	 
277	                            <div class="row col-md-12">	 	                 
278				                    <#-- Pintamos los contenidos relacionados con la categoría actual -->      						                
279									<#assign journalArticles = assetCategoriesCustomService.findJournalArticlesElasticSearchByCategoryId(currentCategory.getCategoryId(), groupId, portalUtil.getCompanyId(request), structureArticulo.getStructureId(), locale,"fecha", "desc")/>      
280									 
281						           	<#list journalArticles as journalArticle>								            
282						            	<#assign document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale))									                      
283							                     currentUrl = renderResponse.createRenderURL() 
284							                     detailPage = "detalle" 
285						                     	 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) 
286						             			 detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE) 
287						             			 titulo=""   
288						             			 tipo=""        
289						             			 resumen=""	      			  
290						     			/>     			      	  	      			      	  
291										 
292										<#if document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
293											<#assign tituloNode = document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") 
294									         	 titulo = tituloNode.getText() 
295								     		/>										     		 
296								      	</#if>	 
297								      	<#if document.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") ? has_content> 
298											<#assign tipoNode = document.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") 
299									         	 tipo = tipoNode.getText() 
300								     		/>										     		 
301								      	</#if>		 
302								      	<#if document.selectSingleNode("/root/dynamic-element[@name='resumen']/dynamic-content") ? has_content> 
303											<#assign resumenNode = document.selectSingleNode("/root/dynamic-element[@name='resumen']/dynamic-content") 
304												 resumen = resumenNode.getText() 
305											/>										     		 
306										</#if>	    								      			 
307				      	  
308										${currentUrl.setParameter("categoryId",categoryId+"")} 
309										${detailUrl.setParameter("categoryId",currentCategory.getCategoryId()+"")} 
310										${detailUrl.setParameter("articleId", journalArticle.getArticleId())}																	  
311																				 
312										<div class="col-md-6 articulo-relacionado">	 
313					                  	    <#if tipo == "ext">       
314					                  	    	<#assign articleContent = journalArticleService.getArticleContent(journalArticle, "TPL_ARTICULO_EXTERNO", "VIEW", locale, themeDisplay)/> 
315					                  	    	${articleContent}     
316					                  		<#elseif tipo == "list" >							                  			 
317					                  			<h4 class="title">${titulo}</h4> 
318					                  			<#if resumen != ""> 
319													<div class="summary tipo-list">${resumen} </div>											 
320												</#if> 
321										 
322					                  			<#assign articulosRelacionadosNode =  document.selectNodes("/root/dynamic-element[@name='articulosRelacionados']/dynamic-content")   /> 
323												<#if articulosRelacionadosNode?size gt 0> 
324					                  			<#if articulosRelacionadosNode[0].getText()?has_content> 
325					                  				<ul> 
326														<#assign contadorArticulosRel = 0/> 
327							                            <#list articulosRelacionadosNode as articuloRelacionado> 
328							                                <#if articuloRelacionado?has_content && articuloRelacionado.getText() ? has_content> 
329						                                        <#assign articuloRelacionadoJSONObject = jsonFactoryUtil.createJSONObject(articuloRelacionado.getText()) />                                             
330						                                        <#if articuloRelacionadoJSONObject.get("classPK")?has_content> 
331						                                            <#assign articuloRelacionadoClassPk = articuloRelacionadoJSONObject.get("classPK") /> 
332						                                            <#assign journalArticleList = journalArticleService.fetchLatestArticle(articuloRelacionadoClassPk?number)  
333						                                                    currentUrlList = renderResponse.createRenderURL()								                  
334						                                                    documentArticleList = SAXReaderUtil.read(journalArticleList.getContentByLocale(locale))     
335						                                                    tituloArticulo = "" 
336						                                                    tipoArticulo = "" 
337						                                                    enlaceExternoArticulo = "" 
338						                                            />			 
339						                                            <#if  documentArticleList.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
340						                                                <#assign tituloArticuloNode = documentArticleList.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") 
341						                                                    tituloArticulo = tituloArticuloNode.getText() 
342						                                                 /> 
343						                                            </#if>										                                                           			 
344						                                            <#if documentArticleList.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") ? has_content> 
345						                                                <#assign tipoArticuloNode = documentArticleList.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") 
346						                                                    tipoArticulo = tipoArticuloNode.getText() 
347						                                                    /> 
348						                                            </#if>		 									                                             
349					                                                <#assign detailPage = "detalle" 
350					                                                    layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) 
351					                                                    detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE) 
352					                                                />      
353					                                                  							                                                
354																	${detailUrl.setParameter("categoryId",currentCategory.getCategoryId()+"")}	 
355					                                                ${detailUrl.setParameter("articleId", journalArticleList.getArticleId())} 
356					                                                 
357					                                                <#if tipoArticulo == "ext">      
358					                                                	<#if documentArticleList.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']/dynamic-content") ? has_content> 
359							                                                <#assign enlaceExternoArticuloNode = documentArticleList.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']/dynamic-content") 
360							                                                    enlaceExternoArticulo = enlaceExternoArticuloNode.getText() 
361							                                                    /> 
362							                                            </#if>						                                              
363											                  	    	<li> 
364						                                                    <a href="${enlaceExternoArticulo}" target="_blank"  
365						                                                    title="${languageUtil.get(locale,'webasturias.general.external-link')} ${tituloArticulo}">${tituloArticulo}</a>  
366						                                                </li>  
367											                  	    <#else>  
368							                                            <li> 
369						                                                    <a href="${detailUrl}&articleId=${journalArticleList.getArticleId()}&title=${HtmlUtil.escapeURL(tituloArticulo)}&redirect=${HtmlUtil.escapeURL(currentUrlList)}" 
370						                                                    title="${languageUtil.get(locale,'webasturias.general.more-info-sobre')} ${tituloArticulo}">${tituloArticulo}</a>  
371						                                                </li> 
372						                                            </#if>   			                                               	    
373						                                        </#if> 
374						                                    </#if> 
375															 
376															<#assign contadorArticulosRel = contadorArticulosRel +1 /> 													 
377															<#if contadorArticulosRel gte 2> 
378																<#break> 
379															</#if> 
380							                            </#list> 
381						                            </ul> 
382						                            <div class="link-more"> 
383														<a class="more-information" title="${languageUtil.get(locale,'webasturias.general.more-info-about')} ${titulo}" 
384															href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(titulo)}&redirect=${HtmlUtil.escapeURL(currentUrl)}">${languageUtil.get(locale,'webasturias.general.more-info')}</a> 
385													</div>	 
386					                  			</#if> 
387												</#if>												 
388					                  		<#else> 
389					                  			<#assign articleContent = journalArticleService.getArticleContent(journalArticle, "TPL_ARTICULO_LISTADO", "VIEW", locale, themeDisplay)/> 
390					                  	    	${articleContent}    
391					                  			<div class="link-more"> 
392						                      		<a class="more-information" title="${languageUtil.get(locale,'webasturias.general.more-info-about')} ${titulo}" 
393						                      			href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(titulo)}&redirect=${HtmlUtil.escapeURL(currentUrl)}">${languageUtil.get(locale,'webasturias.general.more-info')}</a> 
394						                  		</div>	 
395					                  		</#if>							                    
396					              		</div> 						 
397						        	</#list> 
398						        </div>    
399							</div> 
400						 </div> 
401					</div> 
402				</#if>		       		         
403	        </#if>                 
404        </div> 
405    </div>  
406<#-- No hay subcategorías, pintamos los contenidos de la categoría --> 
407<#else>                   
408  	<div class="card flex-md-row mb-4 box-shadow h-md-250"> 
409      	<div class="card-body d-flex flex-column align-items-start navegacion-categorias"> 
410			${portalUtil.setPageTitle(currentCategory.getTitle(locale), request)} 
411          	<h2 class="mb-0">${currentCategory.getTitle(locale)}</h2>   
412          	<#assign contentId = (assetCategoryPropertyService.fetchCategoryProperty(currentCategory.getCategoryId(), "idContenido").getValue())!""/> 
413			<#if contentId ? has_content>              	 
414                <#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/>                     
415                <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
416					paginaDetalleNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content")	                     
417                    descripcionNode = document.selectSingleNode("/root/dynamic-element[@name='descripcion']/dynamic-content") 
418                 	descripcion = HtmlUtil.stripHtml(descripcionNode.getText()) 
419				/> 
420				<#assign contenidoImagen = journalArticleService.getArticleContent(journalArticleSub, "TPL_CATEGORIA_IMG_ACCESO","VIEW", locale, themeDisplay)/> 
421				<div class="categoria-asociada"> 
422					<div class="row">   
423              			<div class="col-md-2 categoria-imagen">                          			 
424                        	${contenidoImagen}                               	             
425                    	</div> 
426                    	<div class="col-md-10">	                            	 
427                            <div class="row col-md-12">		 
428								<#assign journalArticles = assetCategoriesCustomService.findJournalArticlesElasticSearchByCategoryId(currentCategory.getCategoryId(), groupId, portalUtil.getCompanyId(request), structureArticulo.getStructureId(), locale,"fecha", "desc")/>      
429								 
430					            <#list journalArticles as journalArticle> 
431					            	<#assign document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale))	 
432					                     currentUrl = renderResponse.createRenderURL() 
433					                     detailPage = "detalle" 
434			                         	 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) 
435			                 			 detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE) 
436			                 			 titulo = "" 
437			                 			 tipo = "" 
438			                 			 resumen=""	   
439				         			/>	           					      	 
440									<#if document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
441										<#assign tituloNode = document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") 
442								         	 titulo = tituloNode.getText() 
443							     		/>										     		 
444							      	</#if>	 
445									<#if document.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") ? has_content> 
446										<#assign tipoNode = document.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") 
447								         	 tipo = tipoNode.getText() 
448							     		/>										     		 
449							      	</#if>		 
450							      	<#if document.selectSingleNode("/root/dynamic-element[@name='resumen']/dynamic-content") ? has_content> 
451										<#assign resumenNode = document.selectSingleNode("/root/dynamic-element[@name='resumen']/dynamic-content") 
452											 resumen = resumenNode.getText() 
453										/>										     		 
454									</#if>	     
455									      	      	        
456									${currentUrl.setParameter("categoryId",categoryId+"")} 
457									${detailUrl.setParameter("categoryId",currentCategory.getCategoryId()+"")} 
458									${detailUrl.setParameter("articleId", journalArticle.getArticleId())} 
459																		 
460									<#if tipo == "ext">       
461			                  	    	<#assign articleContent = journalArticleService.getArticleContent(journalArticle, "TPL_ARTICULO_EXTERNO", "VIEW", locale, themeDisplay)/> 
462			                  	    	<div class="col-md-6 articulo-relacionado">${articleContent}    </div> 
463			                  		<#elseif tipo == "list" >	 
464			                  			<div class="col-md-6 articulo-relacionado">						                  			 
465				                  			<h4 class="title">${titulo}</h4> 
466				                  			<#if resumen != ""> 
467												<div class="summary tipo-list">${resumen} </div>											 
468											</#if> 
469										 
470				                  			<#assign articulosRelacionadosNode =  document.selectNodes("/root/dynamic-element[@name='articulosRelacionados']/dynamic-content")   /> 
471											<#if articulosRelacionadosNode?size gt 0> 
472				                  			<#if articulosRelacionadosNode[0].getText()?has_content> 
473				                  				<ul> 
474													<#assign contadorArticulosRel = 0/> 
475						                            <#list articulosRelacionadosNode as articuloRelacionado> 
476						                                <#if articuloRelacionado?has_content && articuloRelacionado.getText() ? has_content> 
477					                                        <#assign articuloRelacionadoJSONObject = jsonFactoryUtil.createJSONObject(articuloRelacionado.getText()) />                                             
478					                                        <#if articuloRelacionadoJSONObject.get("classPK")?has_content> 
479					                                            <#assign articuloRelacionadoClassPk = articuloRelacionadoJSONObject.get("classPK") /> 
480					                                            <#assign journalArticleList = journalArticleService.fetchLatestArticle(articuloRelacionadoClassPk?number)  
481					                                                    currentUrlList = renderResponse.createRenderURL()								                  
482					                                                    documentArticleList = SAXReaderUtil.read(journalArticleList.getContentByLocale(locale))     
483					                                                    tituloArticulo = "" 
484					                                                    tipoArticulo = "" 
485					                                                    enlaceExternoArticulo = "" 
486					                                            />								                             
487					                            
488					                                            <#if documentArticleList.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
489					                                                <#assign tituloArticuloNode = documentArticleList.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") 
490					                                                    tituloArticulo = tituloArticuloNode.getText() 
491					                                                    /> 
492					                                            </#if>										                                                           			 
493					                                            <#if documentArticleList.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") ? has_content> 
494					                                                <#assign tipoArticuloNode = documentArticleList.selectSingleNode("/root/dynamic-element[@name='tipo']/dynamic-content") 
495					                                                    tipoArticulo = tipoArticuloNode.getText() 
496					                                                    /> 
497					                                            </#if>										                                             
498				                                                <#assign detailPage = "detalle" 
499				                                                    layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) 
500				                                                    detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE) 
501				                                                />      
502				                                                  							                                                
503																${detailUrl.setParameter("categoryId",currentCategory.getCategoryId()+"")}	 
504				                                                ${detailUrl.setParameter("articleId", journalArticleList.getArticleId())} 
505				                                                 
506				                                                <#if tipoArticulo == "ext">      
507				                                                	<#if documentArticleList.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']/dynamic-content") ? has_content> 
508						                                                <#assign enlaceExternoArticuloNode = documentArticleList.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']/dynamic-content") 
509						                                                    enlaceExternoArticulo = enlaceExternoArticuloNode.getText() 
510						                                                    /> 
511						                                            </#if>						                                              
512										                  	    	<li> 
513					                                                    <a href="${enlaceExternoArticulo}" target="_blank"  
514					                                                    title="${languageUtil.get(locale,'webasturias.general.external-link')} ${tituloArticulo}">${tituloArticulo}</a>  
515					                                                </li>  
516										                  	    <#else>  
517						                                            <li> 
518					                                                    <a href="${detailUrl}&articleId=${journalArticleList.getArticleId()}&title=${HtmlUtil.escapeURL(tituloArticulo)}&redirect=${HtmlUtil.escapeURL(currentUrlList)}" 
519					                                                    title="${languageUtil.get(locale,'webasturias.general.more-info-sobre')} ${tituloArticulo}">${tituloArticulo}</a>  
520					                                                </li> 
521					                                            </#if>    
522				                                                	    
523					                                        </#if> 
524					                                    </#if> 
525						                                
526														<#assign contadorArticulosRel = contadorArticulosRel +1 /> 													 
527														<#if contadorArticulosRel gte 2> 
528															<#break> 
529														</#if> 
530						                            </#list> 
531					                            </ul> 
532					                            <div class="link-more"> 
533													<a class="more-information" title="${languageUtil.get(locale,'webasturias.general.more-info-about')} ${titulo}" 
534														href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(titulo)}&redirect=${HtmlUtil.escapeURL(currentUrl)}">${languageUtil.get(locale,'webasturias.general.more-info')}</a> 
535												</div>	 
536				                  			</#if> 
537											</#if>											 
538				                  		</div> 
539			                  		<#else> 
540			                  			<#assign articleContent = journalArticleService.getArticleContent(journalArticle, "TPL_ARTICULO_LISTADO", "VIEW", locale, themeDisplay)/> 
541			                  	    	<div class="col-md-6 articulo-relacionado"> 
542				                  	    	${articleContent}    
543				                  			<div class="link-more"> 
544					                      		<a class="more-information" title="${languageUtil.get(locale,'webasturias.general.more-info-about')} ${titulo}" 
545					                      			href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(titulo)}&redirect=${HtmlUtil.escapeURL(currentUrl)}">${languageUtil.get(locale,'webasturias.general.more-info')}</a> 
546					                  		</div>	 
547					                  	</div> 
548			                  		</#if>	 
549				            	</#list>         
550				            </div>    
551						</div> 
552					 </div> 
553				</div> 
554			</#if>	 
555        </div> 
556    </div>    	 
557</#if> 

Publicador de contenidos

Publicador de contenidos

Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy668.getCategoryProperty(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy668 object "com.liferay.asset.category.property.service.impl.AssetCategoryPropertyLocalServiceImpl@46697634"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if assetCategoryPropertyService.getC...  [in template "217051#217099#573561" at line 20, column 5]
----
1<#assign assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
2		 assetCategoryPropertyService =  serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService") 
3         assetCategoriesCustomService = serviceLocator.findService("pa.mtl.assetcategories.service.api.AssetCategoriesServiceApi") 
4		 SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"] 
5		 HtmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"] 
6		 layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") 
7		 PortletURLFactoryUtil = staticUtil["com.liferay.portal.kernel.portlet.PortletURLFactoryUtil"] 
8		 PortletRequest = staticUtil["javax.portlet.PortletRequest"]   
9		 journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")   
10		 ParamUtil = staticUtil["com.liferay.portal.kernel.util.ParamUtil"]              
11         categoryId = ParamUtil.getLong(request,"categoryId", 0) 
12		 portalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"]         
13         /> 
14<!-- Comprobación de la propiedad categoryId --> 
15<#if (categoryId <= 0) > 
16	<#assign categoryId = ParamUtil.getLong(renderRequest,"categoryId", 0)/> 
17</#if> 
18 
19<#if (categoryId > 0) > 
20    <#if assetCategoryPropertyService.getCategoryProperty(categoryId,"idContenido") ? has_content > 
21        <#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(categoryId,"idContenido")/> 
22        <#assign contentId = contentIdProperty.getValue()/> 
23        <#if contentId ? has_content> 
24            <#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
25             
26            <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
27                destacamosNode =  document.selectNodes("/root/dynamic-element[@name='destacamos']/dynamic-content") 
28            /> 
29            <#if destacamosNode[0].getText()?has_content> 
30                <div class="caja-redonda sin-fondo">  
31                <h3>${languageUtil.get(locale,'webasturias.destacamos.titulo')}</h3>  
32                <div class="caja-redonda-content">   
33                    <div class="content-summary without-icon">  
34                        <ul> 
35							<#assign structureEnlace = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ENLACE") /> 
36							<#assign structureEnlaceSidra = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ENLACE_SIDRA") /> 
37							<#assign structureArticulo = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ARTICULO") /> 
38 
39                            <#list destacamosNode as destacamos> 
40                                <#if destacamos?has_content> 
41                                    <#if destacamos.getText() ? has_content> 
42                                        <#assign  destacamosJSONObject = jsonFactoryUtil.createJSONObject(destacamos.getText()) />                                             
43                                        <#if  destacamosJSONObject.get("classPK")?has_content> 
44										    <#assign destacamosClassPk = destacamosJSONObject.get("classPK") /> 
45                                            <#assign journalArticle = journalArticleService.fetchLatestArticle(destacamosClassPk?number)  
46                                                    currentUrl = renderResponse.createRenderURL()								                  
47                                                    document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale))                 		  
48                                                    urlEnlace = ""                 		 
49                                                    titulo = "" 
50                                            /> 
51                             
52                                            <#if  document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
53                                                <#assign tituloNode = document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") 
54                                                    titulo = tituloNode.getText() 
55                                                    /> 
56                                            </#if>	 
57                                            <#if  document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") ? has_content> 
58                                                <#assign urlEnlaceNode = document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") 
59                                                    urlEnlace = urlEnlaceNode.getText() 
60                                                    /> 
61                                            </#if>	                			 
62                                             
63                                            <#if structureArticulo.getStructureKey() == journalArticle.getStructureId() > 
64                                                <#assign detailPage = "detalle" 
65                                                    layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) 
66                                                    detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE) 
67                                                />      
68                                                     
69                                                ${detailUrl.setParameter("articleId", journalArticle.getArticleId())} 
70                                                ${detailUrl.setParameter("categoryId",categoryId?string)} 
71                                                 
72                                                <li> 
73                                                    <a href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(titulo)}&redirect=${HtmlUtil.escapeURL(currentUrl)}" 
74                                                    title="${languageUtil.get(locale,'webasturias.general.more-info-sobre')} ${titulo}">${titulo}</a>  
75                                                </li>		     	             	 
76                                            <#elseif structureEnlace.getStructureKey() == journalArticle.getStructureId() > 
77                                                <#if  document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") ? has_content> 
78                                                    <#assign urlEnlaceNode = document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") 
79                                                        urlEnlace = urlEnlaceNode.getText() 
80                                                        /> 
81                                                </#if>	 
82                                                <li> 
83                                                    <a class="popup" target="_blank" href="${urlEnlace}"  
84                                                        title="${titulo}. ${languageUtil.get(locale,'webasturias.general.external-link')}">${titulo}</a> 
85                                                </li>  
86											 <#elseif structureEnlaceSidra.getStructureKey() == journalArticle.getStructureId() > 
87												<#assign  assetCategory = assetCategoryService.getCategory(categoryId) 
88													categoryName = assetCategory.getTitle(locale) 
89													titulo = titulo?replace("xxxx", categoryName)/> 
90												  
91												 <#if  document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") ? has_content> 
92														<#assign urlEnlaceNode = 		document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") 
93														urlEnlace = urlEnlaceNode.getText()?replace("migaurlReplace", portalUtil.getCurrentCompleteURL(request))?replace("migatextoReplace", categoryName)?replace("textoReplace", categoryName)  
94														/> 
95													</#if>	 
96													<li> 
97														<a class="popup" target="_blank" href="${urlEnlace}"  
98															title="${titulo}. ${languageUtil.get(locale,'webasturias.general.external-link')}">${titulo}</a> 
99													</li>  
100												</#if> 
101                                        </#if> 
102                                    </#if> 
103                                </#if> 
104                            </#list> 
105                            </ul> 
106                        </div>  
107                    </div>  
108                </div> 
109            </#if> 
110        </#if> 
111    </#if> 
112</#if> 

Publicador de contenidos

Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy668.getCategoryProperty(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy668 object "com.liferay.asset.category.property.service.impl.AssetCategoryPropertyLocalServiceImpl@46697634"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if assetCategoryPropertyService.getC...  [in template "217051#217099#573557" at line 18, column 5]
----
1<#assign assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
2		 assetCategoryPropertyService =  serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService") 
3         assetCategoriesCustomService = serviceLocator.findService("pa.mtl.assetcategories.service.api.AssetCategoriesServiceApi") 
4		 SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"] 
5		 HtmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"] 
6		 layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") 
7		 PortletURLFactoryUtil = staticUtil["com.liferay.portal.kernel.portlet.PortletURLFactoryUtil"] 
8		 PortletRequest = staticUtil["javax.portlet.PortletRequest"]   
9		 journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")   
10		 ParamUtil = staticUtil["com.liferay.portal.kernel.util.ParamUtil"]              
11         categoryId = ParamUtil.getLong(request,"categoryId", 0)      
12/> 
13<!-- Comprobación de la propiedad categoryId --> 
14<#if (categoryId <= 0) > 
15	<#assign categoryId = ParamUtil.getLong(renderRequest,"categoryId", 0)/> 
16</#if> 
17<#if (categoryId > 0) > 
18    <#if assetCategoryPropertyService.getCategoryProperty(categoryId,"idContenido") ? has_content > 
19        <#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(categoryId,"idContenido")/> 
20        <#assign contentId = contentIdProperty.getValue()/> 
21        <#if contentId ? has_content> 
22        	<#assign  
23				structureEnlace = assetCategoriesCustomService.getJournalStructureByKey(groupId,"STR_ENLACE") 
24				journalArticles = assetCategoriesCustomService.findJournalArticlesByCategoryId(categoryId, groupId, structureEnlace.getStructureId(), null, "title", "asc", null, null) 
25			/> 
26			<#if journalArticles ? has_content> 
27	            <div class="caja-redonda sin-fondo"> 
28		            <h3>${languageUtil.get(locale,'webasturias.webtematicas.titulo')}</h3>  
29		            <div class="caja-redonda-content"> 
30		                <div class="content-summary without-icon"> 
31		                    <ul> 
32		                        <#list journalArticles as journalArticle> 
33					            	<#assign document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale))/> 
34					            	 
35		                            <#if  document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
36		                                <#assign tituloNode = document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") 
37		                                    titulo = tituloNode.getText() 
38		                                    /> 
39		                            </#if>	 
40		                            <#if  document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") ? has_content> 
41		                                <#assign urlEnlaceNode = document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") 
42		                                    urlEnlace = urlEnlaceNode.getText() 
43		                                    /> 
44		                            </#if> 
45		                             
46		                            <li> 
47		                                <a class="popup" target="_blank" href="${urlEnlace}"  
48		                                    title="${titulo}. ${languageUtil.get(locale,'webasturias.general.external-link')}">${titulo}</a> 
49		                            </li> 
50		                        </#list> 
51		                    </ul> 
52		                </div>  
53		            </div>  
54	            </div> 
55            </#if> 
56        </#if> 
57    </#if> 
58</#if> 

Publicador de contenidos

Contacta columna derecha

Contacta

Servicio de atención ciudadana

Icono - Llámanos

Llámanos al 012 o al 985 279 100 (985 279 100 si estás fuera de Asturias)

Icono - Buzón del ciudadano

Escríbenos al buzón del ciudadano

Icono - Ven a vernos

Ven a vernos a nuestras oficinas

Icono - Solicita cita previa

Solicita cita previa