Navegación por categorías

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> vocabulary  [in template "646115#646149#789958" at line 26, column 22]

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

Publicador de contenidos

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@3ca9b187"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign category = assetCategoryServi...  [in template "646115#646149#789967" at line 24, column 1]
----
1<#assign SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"] 
2         journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
3         assetCategoryService =  serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
4         assetCategoryPropertyService =  serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService") 
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         HtmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"]        
9         assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") 
10         assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")  
11         ParamUtil = staticUtil["com.liferay.portal.kernel.util.ParamUtil"] 
12         curCategoryId =ParamUtil.getLong(renderRequest,"categoryId", 0)         
13        /> 
14 
15<div class="taglib-header ">  
16	<span class="header-back-to lfr-portal-tooltip" data-title="${languageUtil.get(locale,"medio.ambiente.general.back")}">  
17    	<a href="javascript:history.back()" target="_self" class=" lfr-icon-item taglib-icon">  
18        <span class=""><svg class="lexicon-icon lexicon-icon-angle-left" focusable="false" role="img" viewBox="0 0 512 512"><path class="lexicon-icon-outline" d="M114.106 254.607c0.22 6.936 2.972 13.811 8.272 19.11l227.222 227.221c11.026 11.058 28.94 11.058 39.999 0 11.058-11.026 11.058-28.94 0-39.999l-206.333-206.333c0 0 206.333-206.333 206.333-206.333 11.058-11.059 11.058-28.973 0-39.999-11.058-11.059-28.973-11.059-39.999 0l-227.221 227.221c-5.3 5.3-8.052 12.174-8.273 19.111z"></path></svg></span>  
19        <span class="taglib-text hide-accessible">${languageUtil.get(locale,"medio.ambiente.general.back")}</span> </a>  
20     </span> 
21     <h3 class="header-title"><span>${languageUtil.get(locale,"medio.ambiente.general.back")}</span> </h3>  
22 </div> 
23	              
24<#assign category = assetCategoryService.getAssetCategory(curCategoryId)/>  
25 
26<div class="link-back-list"> 
27	<div class="caja-redonda light"> 
28		<a class="show-all" href="/enlaces-de-interes"><@liferay.language key="medio.ambiente.enlace.all" /></a> 
29	</div> 
30</div> 
31  
32<div class="card flex-md-row mb-4 box-shadow h-md-250"> 
33  	<div class="card-body d-flex flex-column align-items-start">       		      
34	   	 
35	   	<#if category ? has_content > 
36	   		<h2 class="mb-0"><@liferay.language key="medio.ambiente.enlace.de"/> ${category.getTitle(locale)}</h2> 
37	   	<#else>     
38      		<h2 class="mb-0"><@liferay.language key="medio.ambiente.enlace.enlaces" /></h2> 
39      	</#if>    
40      	 
41    	<div class="listado-enlaces-secciones enlaces-detallado">  
42					         
43			<#if entries?has_content>		                
44	        	<#list entries as curEntry>   		                   
45                	<#assign journalArticle = journalArticleService.fetchLatestArticle(curEntry.getClassPK())  /> 
46                	<#assign categoriaServiciosTramites = 0 />  
47					<#assign assetEntry = assetEntryLocalService.fetchEntry("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()?number) 
48	             		 listadoCategorias = assetCategoryService.getAssetEntryAssetCategories(assetEntry.getEntryId()) 
49	             	/>	 
50					 
51					<#list listadoCategorias as currentCategory>	  
52						<#if ( (currentCategory.getTitle(locale) == "${languageUtil.get(locale,'medio.ambiente.category.servicios-tramites')}") || (currentCategory.getTitle(locale) == "${languageUtil.get(locale,'medio.ambiente.category.ayudas-subvenciones')}") ) >  
53							<#assign categoriaServiciosTramites = 1 />  
54						</#if> 
55					</#list>      
56						              		 
57					<#if categoriaServiciosTramites == 0 >               							 
58                							 
59				    	<#assign currentUrl = renderResponse.createRenderURL() 
60			                 detailPage = "detalle-enlaces" 
61	                         layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage)	                 		  
62	                 		 document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale)) 
63	                 		 descripcion = "" 
64	                 		 urlEnlace = "" 
65	                 		 nombreEnlace = "" 
66	                 		 titulo = "" 
67	                 	/> 
68	                 	 
69	                 	<#if  document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
70							<#assign tituloNode = document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") 
71					         	 titulo = tituloNode.getText() 
72					     		/> 
73				      	</#if>	 
74				      	 
75						<#if  document.selectSingleNode("/root/dynamic-element[@name='descripcion']/dynamic-content") ? has_content> 
76							<#assign descripcionNode = document.selectSingleNode("/root/dynamic-element[@name='descripcion']/dynamic-content") 
77					         	 descripcion = descripcionNode.getText() 
78					     		/> 
79				      	</#if>	     	 
80	 
81		               	<#if  document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") ? has_content> 
82							<#assign urlEnlaceNode = document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") 
83					         	 urlEnlace = urlEnlaceNode.getText() 
84					     		/> 
85				      	</#if>	  
86		               	<#if  document.selectSingleNode("/root/dynamic-element[@name='textoAlternativo']/dynamic-content") ? has_content> 
87							<#assign textoAlternativoNode = document.selectSingleNode("/root/dynamic-element[@name='textoAlternativo']/dynamic-content") 
88					         	 textoAlternativo = textoAlternativoNode.getText() 
89					     		/> 
90				      	</#if>	  
91				      				 
92				      	<#assign nombreEnlace = titulo />									       
93					    <#if (textoAlternativo?? && textoAlternativo != "")>										    	 
94							 <#assign nombreEnlace = textoAlternativo /> 
95						</#if>						      											 
96			         	      		                 		  
97		        		<div class="bloque-enlace">  
98	                        <h4>${titulo}</h4>                            
99	                        <#if (descripcion?? && descripcion != "")>	 
100	                        	<div class="summary">${descripcion}</div>             
101	                        </#if>                                    
102	                        <div class="popup"> 
103	                           <a class="popup" target="_blank"  
104	                           		href="${urlEnlace}"  
105	                           		title="${nombreEnlace}. <@liferay.language key="medio.ambiente.general.external-link" />">${nombreEnlace}</a> 
106	                        </div> 
107	                    </div> 
108	                </#if> 
109	        	</#list>    	 
110		    		 
111			<#else> 
112				<div class="alert alert-info"> 
113					<@liferay.language key="medio.ambiente.category.not-found-results"/> 
114				</div> 
115			</#if>	 
116			  	 
117		</div> 
118	</div>                   
119</div>