Navegación por categorías

Navegación por categorías

Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy75.getAssetCategory(long)" threw an exception when invoked on com.sun.proxy.$Proxy75 object "com.liferay.portlet.asset.service.impl.AssetCategoryLocalServiceImpl@60b685ac"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: currentCategory = assetCategoryServic...  [in template "30812#30846#41013" at line 25, column 10]
	- Reached through: #assign-container  [in template "30812#30846#41013" at line 25, column 1]
----
1<#assign ParamUtil = staticUtil["com.liferay.portal.kernel.util.ParamUtil"] 
2         SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"] 
3         PortletURLFactoryUtil = staticUtil["com.liferay.portal.kernel.portlet.PortletURLFactoryUtil"] 
4         PropsUtil = staticUtil["com.liferay.portal.kernel.util.PropsUtil"] 
5         PortletRequest = staticUtil["javax.portlet.PortletRequest"] 
6         assetCategoryService =  serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
7         assetCategoryPropertyService =  serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService") 
8         assetEntryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") 
9         journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
10         layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") 
11         categoryId =ParamUtil.getLong(renderRequest,"categoryId", 0) 
12         assetCategoriesCustomService = serviceLocator.findService("pa.mtl.assetcategories.customservice.api.AssetCategoriesCustomServiceApi") 
13         HtmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"] 
14         maxLoop = 100 
15/> 
16 
17<#if ! themeDisplay ? has_content>         
18    <#assign liferay_theme = PortletJspTagLibs["/META-INF/liferay-theme.tld"] /> 
19    <@liferay_theme["defineObjects"] /> 
20</#if> 
21 
22 
23 
24<#-- obtener categoría actual y subcategorías --> 
25<#assign currentCategory = assetCategoryService.getAssetCategory(categoryId) 
26         childCategories = assetCategoriesCustomService.getChildCategoriesOrdered(categoryId,locale) 
27/> 
28          
29 
30  
31 <#if assetCategoryPropertyService.getCategoryProperty(currentCategory.getCategoryId(),"idContenido")? has_content > 
32 	<#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(currentCategory.getCategoryId(),"idContenido")/> 
33	<#assign contentId = contentIdProperty.getValue()/> 
34	<#if contentId ? has_content> 
35		<#assign journalArticle = journalArticleService.getLatestArticle(groupId,contentId) 
36				 document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale))/> 
37		<#if  document.selectSingleNode("/root/dynamic-element[@name='descripcion']/dynamic-content") ? has_content> 
38			<#assign descripcionNode = document.selectSingleNode("/root/dynamic-element[@name='descripcion']/dynamic-content") 
39		         	 descripcion = descripcionNode.getText() 
40		     />	 
41		</#if>	                     
42	</#if> 
43</#if> 
44 
45                             
46	<div class="card flex-md-row mb-4 box-shadow h-md-250"> 
47     	<div class="card-body d-flex flex-column align-items-start">      
48        	<h2 class="mb-0">${currentCategory.getTitle(locale)}</h2>  
49            <div class="outer">                                                         
50            	<p>${descripcion}</p> 
51                <ul class="two-col-1 blt-simple-a"> 
52                 
53                <#if childCategories?has_content> 
54				    	<#foreach childCategory in childCategories> 
55				    	 
56				    		<#assign detailPage = "general-categorias" 
57							         layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
58							            	 		  
59				    		<#-- obtener el contenido de la categoría hija --> 
60		                    <#if assetCategoryPropertyService.getCategoryProperty(childCategory.getCategoryId(),"idContenido") ? has_content > 
61		                    	<#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(childCategory.getCategoryId(),"idContenido") 
62		                        		 contentId = contentIdProperty.getValue()/> 
63		                       <#if contentId ? has_content> 
64		                       		<#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
65		                                         
66		                            <#if journalArticleSub?has_content> 
67		                                   <#-- obtener el contenido de la categoría actual --> 
68		                                   <#assign childCategoryContent = journalArticleService.getArticleContent(journalArticleSub, "","VIEW", locale, themeDisplay)/> 
69		                                             
70		                                   <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
71		                                                     paginaDetalleNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content") 
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							                      	 
81							                     </#if> 
82											</#if> 
83							                                     
84		                              </#if> 
85		                        </#if> 
86		                    </#if> 
87				    		<#assign categoryUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)/> 
88				    		${categoryUrl.setParameter("categoryId", childCategory.getCategoryId()+"")} 
89							                     
90							                	 
91				    		<#assign nContents = assetCategoriesCustomService.countJournalArticlesByCategoryId(childCategory.getCategoryId(), groupId, 0)/> 
92				    		 
93				    		 <li><a title="${childCategory.getTitle(locale)}" href="${categoryUrl}">${childCategory.getTitle(locale)}</a> (${nContents})</li> 
94				    	</#foreach> 
95				</#if> 
96                 
97                </ul> 
98           </div> <!-- outer -->    
99       </div><!-- card-body -->                  
100   </div><!-- card --> 

Publicador de contenidos

VENTANILLA DESAHUCIOS

Orientación medidas y ayuda para los afectados