Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy50.getLayout(long, boolean, long)" threw an exception when invoked on com.sun.proxy.$Proxy50 object "com.liferay.portal.service.impl.LayoutLocalServiceImpl@3c702779"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: layoutDetail = layoutLocalService.get...  [in template "217051#217099#693487" at line 68, column 105]
	- Reached through: #assign-container  [in template "217051#217099#693487" at line 66, column 97]
----
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.kernel.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		 PropsUtil = staticUtil["com.liferay.portal.kernel.util.PropsUtil"]  
11/> 
12 
13<#if entries ? has_content> 
14    <#list entries as category> 
15		<#assign currentCategory = category /> 
16    </#list> 
17</#if> 
18 
19<#assign categoryId = currentCategory.getCategoryId() 
20         childCategories = assetCategoriesCustomService.getChildCategoriesOrdered(categoryId,locale) 
21         showContents = true 
22         forceShowCategories = false 
23	 	 portletDisplay = themeDisplay.getPortletDisplay() 
24		 navbarId = "navbar_" + portletDisplay.getId() 
25/> 
26 
27<#if childCategories?has_content>	 
28	<#assign structureId = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ARTICULO").getStructureId()/> 
29	<#assign structureEnlace = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ENLACE")/>  
30    <#assign structures = [structureId,structureEnlace.getStructureId()] /> 
31 
32	<div class="row main-menu"> 
33		<div class="container"> 
34	    	<nav class="navbar navbar-expand-lg navbar-dark">  
35	  			<button class="navbar-toggler" type="button" data-target="#${navbarId}" aria-controls="${navbarId}"data-toggle="collapse" aria-expanded="false" aria-label="Toggle navigation"> 
36	    			<span class="navbar-toggler-icon"></span>  
37	  			</button>  
38		        <div class="collapse navbar-collapse" id="${navbarId}">  
39		       		<div class="contenedor-menu"> 
40			        	<ul aria-label="Páginas del sitio web" class="menu-principal navbar-nav mr-auto mt-2 mt-lg-0" role="menubar">  
41			        		<#list childCategories as childCategory> 
42							 
43								<#assign contentId = (assetCategoryPropertyService.getCategoryProperty(childCategory.getCategoryId(), "idContenido").getValue())!""/> 
44								<#if contentId ? has_content> 
45												 
46									<#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
47									<#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
48											paginaDetalleNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content") 
49									/> 
50									<#if document.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']")?? > 
51										<#assign enlaceExternoNode = document.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']/dynamic-content")/> 
52									<#else> 
53										<#assign enlaceExternoNode = "" /> 
54									</#if> 
55									<#if enlaceExternoNode?has_content && enlaceExternoNode.getText()?has_content> 
56										<#assign  detailPage = ""/> 
57										<#assign  pageExternal = enlaceExternoNode.getText()/> 
58										<#assign  targetLink = "target='_blank'"/> 
59									<#else> 
60										<#assign  pageExternal = ""/> 
61										<#assign  targetLink = ""/> 
62										<#if paginaDetalleNode?has_content && paginaDetalleNode.getText()?has_content> 
63											<#assign  pageDetail = paginaDetalleNode.getText()/> 
64											<#assign detailPage = "general-open-data"/> 
65											<#if (pageDetail?index_of("@")>0)> 
66												<#assign pageDetailPosition = (pageDetail?index_of("@")-1) 
67													pageDetail = pageDetail[0..pageDetailPosition] 
68													layoutDetail = layoutLocalService.getLayout(themeDisplay.getScopeGroupId(),false,pageDetail?number)					                          					  
69												/> 
70											</#if> 
71										<#else> 
72											<#assign detailPage = "general-open-data" 
73													 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
74										</#if> 
75									</#if> 
76									<#if detailPage?has_content> 
77										<#assign categoryUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)/> 
78												 ${categoryUrl.setParameter("categoryId", childCategory.getCategoryId()+"")}	 
79									<#else> 
80										<#assign categoryUrl = pageExternal/> 
81									</#if> 
82																					 
83									<#if journalArticleSub?has_content> 
84										<li class="nav-item dropdown dmenu" id="" role="presentation">  
85											<a aria-labelledby="" aria-haspopup="true" class="nav-link dropdown-toggle" href="${categoryUrl}" role="menuitem" ${targetLink}> 
86												${childCategory.getTitle(locale)} 
87											</a> 			         
88											<#-- comprobar si la categoría tiene categorías hijas --> 
89											<#assign categoriesSecondLevel = assetCategoriesCustomService.getChildCategoriesOrdered(childCategory.getCategoryId(),locale)/> 
90											<#if categoriesSecondLevel?has_content>	 
91												<ul aria-expanded="false" class="dropdown-menu sm-menu" role="menu"> 
92													<#list categoriesSecondLevel as categorySecondLevel> 
93														<#assign contentId = (assetCategoryPropertyService.getCategoryProperty(categorySecondLevel.getCategoryId(), "idContenido").getValue())!""/> 
94														<#if contentId ? has_content> 
95															<#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
96															<#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
97																	paginaDetalleNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content") 
98															/> 
99															<#if document.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']")?? > 
100																<#assign enlaceExternoNode = document.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']/dynamic-content")/> 
101															<#else> 
102																<#assign enlaceExternoNode = "" /> 
103															</#if> 
104																 
105															<#if enlaceExternoNode?has_content && enlaceExternoNode.getText()?has_content> 
106																<#assign  detailPage = ""/> 
107																<#assign  pageExternal = enlaceExternoNode.getText()/> 
108																<#assign  targetLink = "target='_blank'"/> 
109															<#else> 
110																<#assign  pageExternal = ""/> 
111																<#assign  targetLink = ""/> 
112																<#if paginaDetalleNode?has_content && paginaDetalleNode.getText()?has_content> 
113																	<#assign  pageDetail = paginaDetalleNode.getText()/> 
114																	<#assign detailPage = "general-open-data"/> 
115																	<#if (pageDetail?index_of("@")>0)> 
116																		<#assign pageDetailPosition = (pageDetail?index_of("@")-1) 
117																			pageDetail = pageDetail[0..pageDetailPosition] 
118																			layoutDetail = layoutLocalService.getLayout(themeDisplay.getScopeGroupId(),false,pageDetail?number)					                          					  
119																		/> 
120																	</#if> 
121																<#else> 
122																	<#assign detailPage = "general-open-data" 
123																			 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
124																</#if> 
125															</#if> 
126																 
127															<#if detailPage?has_content> 
128																<#assign categoryUrlSecondLevel = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)/> 
129																${categoryUrlSecondLevel.setParameter("categoryId", categorySecondLevel.getCategoryId()+"")}	 
130															<#else> 
131																<#assign categoryUrlSecondLevel = pageExternal/> 
132															</#if> 
133																										 
134															<#if journalArticleSub?has_content> 
135																<#assign journalArticles = assetCategoriesCustomService.findJournalArticlesElasticSearchByCategoryId(categorySecondLevel.getCategoryId(), groupId, portalUtil.getCompanyId(request), structures, locale,"fecha", "desc")/>				 
136																<#if (journalArticles?size>1)> 
137																	<li class="" id="" role="presentation"> 
138																		<a aria-labelledby="" class="dropdown-item" href="${categoryUrlSecondLevel}" role="menuitem" ${targetLink}>${categorySecondLevel.getTitle(locale)}</a> 
139																	</li> 
140																<#else> 
141																	<#assign countChildCategories = assetCategoryService.getChildCategoriesCount(categorySecondLevel.getCategoryId()) /> 
142																	<#if (countChildCategories > 0 || journalArticles?size = 0)> 
143																		<li class="" id="" role="presentation"> 
144																			<a aria-labelledby="" class="dropdown-item" href="${categoryUrlSecondLevel}" role="menuitem" ${targetLink}>${categorySecondLevel.getTitle(locale)}</a> 
145																		</li> 
146																	<#else> 
147																		<#assign isListJournalsOrNotLink = false/> 
148																		<#if (journalArticles?size = 1)> 
149																			<#assign  
150																				journalArticle = journalArticles[0] 
151																				ddmStructureKey = journalArticle.getDDMStructureKey() 
152																			/> 
153																		</#if> 
154																		<#if (ddmStructureKey = "STR_ENLACE")> 
155																			<#assign isListJournalsOrNotLink = true/> 
156																		</#if> 
157																		<#if isListJournalsOrNotLink> 
158																			<li class="" id="" role="presentation"> 
159																				<a aria-labelledby="" class="dropdown-item" href="${categoryUrlSecondLevel}" role="menuitem" ${targetLink}>${categorySecondLevel.getTitle(locale)}</a> 
160																			</li> 
161																		<#else> 
162																			<#list journalArticles as journalArticle> 
163																				<#assign  
164																					document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale))           
165																					title = "" 
166																					resumen = ""	 
167																					currentUrl = renderResponse.createRenderURL() 
168																					detailPage = "detalle-open-data" 
169																					layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) 
170																					detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE) 
171																				/> 
172																				 
173																				${detailUrl.setParameter("articleId", journalArticle.getArticleId())} 
174																				${currentUrl.setParameter("categoryId",categoryId+"")} 
175																				<#if document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
176																					<#assign  
177																						titleNode = document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content")	 
178																						title = titleNode.getText() 
179																						articleTitle = titleNode.getText() 
180																					/> 
181																				</#if> 	 
182																				<#if (countChildCategories <= 0 && journalArticles?size = 1)> 
183																					${detailUrl.setParameter("categoryId",childCategory.getCategoryId()+"")} 
184																					<#assign title = childCategory.getTitle(locale)/> 
185																				<#else> 
186																					${detailUrl.setParameter("categoryId",currentCategory.getCategoryId()+"")}	 
187																				</#if> 
188																				<li class="" id="" role="presentation"> 
189																					<a aria-labelledby="" class="dropdown-item" href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(articleTitle)}&redirect=${HtmlUtil.escapeURL(currentUrl)}" role="menuitem"> 
190																						${categorySecondLevel.getTitle(locale)} 
191																					</a> 
192																				</li>		 
193																			</#list> 
194																		</#if> 
195																	</#if> 
196																</#if> 
197															</#if> 
198														</#if> 
199													</#list> 
200												</ul> 
201											</#if>         
202										</li> 						              	          
203									</#if> 
204								</#if> 
205	       					</#list>   		              	   
206			            </ul> 
207		            </div> 
208		            <div onclick="clickHamburger()" class="hamburger hamburger-ocultar" style="display: none;"> 
209		            	<span>Menú</span> 
210		            	<img src="/o/transparencia-theme/images/comunes/menu_white.png" alt="Abrir menú principal"> 
211		            </div> 
212 
213					<div onclick="clickCross()" class="cross" style="display: block;"> 
214						<span>Menú</span> 
215						<img src="/o/transparencia-theme/images/comunes/close_white.png" alt="Cerrar menú principal"> 
216					</div> 
217		        </div> 
218		     </nav> 
219	     </div>  
220	</div>                           
221</#if> 
Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy50.getLayout(long, boolean, long)" threw an exception when invoked on com.sun.proxy.$Proxy50 object "com.liferay.portal.service.impl.LayoutLocalServiceImpl@3c702779"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: layoutDetail = layoutLocalService.get...  [in template "217051#217099#693510" at line 62, column 73]
	- Reached through: #assign-container  [in template "217051#217099#693510" at line 60, column 65]
----
1<#assign assetCategoriesCustomService = serviceLocator.findService("pa.mtl.assetcategories.service.api.AssetCategoriesServiceApi") 
2		 assetCategoryPropertyService =  serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService") 
3		 SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"] 
4		 layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") 
5		 PortletURLFactoryUtil = staticUtil["com.liferay.portal.kernel.portlet.PortletURLFactoryUtil"] 
6		 PortletRequest = staticUtil["javax.portlet.PortletRequest"] 
7		 journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")   
8/> 
9 
10<#-- Siempre debe haber uno y solo uno --> 
11<#if entries ? has_content> 
12    <#list entries as category> 
13        <#assign currentCategory = category /> 
14    </#list> 
15</#if> 
16 
17<#assign categoryId = currentCategory.getCategoryId() 
18         childCategories = assetCategoriesCustomService.getChildCategoriesOrdered(categoryId,locale) 
19         showContents = true 
20         forceShowCategories = false 
21/> 
22 
23<#-- Pintar subcategorías --> 
24<#if childCategories?has_content>	 
25  
26 	<div class="col-md-12 contenedor-interior"> 
27		<div class="row col-md-12" >             
28			<#if assetCategoryPropertyService.getCategoryProperty(currentCategory.getCategoryId(),"idContenido") ? has_content > 
29				<#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(currentCategory.getCategoryId(),"idContenido")/> 
30				<#assign contentId = contentIdProperty.getValue()/> 
31				<#if contentId ? has_content> 
32					<#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/>       
33					<#assign childCategoryContent = journalArticleService.getArticleContent(journalArticleSub, "TPL_CATEGORIA_TITULO","VIEW", locale, themeDisplay)/> 
34					${childCategoryContent}     
35				</#if>	 
36			</#if>	 
37		</div>     
38 
39		<div class="row col-md-12 listado-categorias-portada" > 
40			<#list childCategories as childCategory> 
41				<#assign contentId = (assetCategoryPropertyService.getCategoryProperty(childCategory.getCategoryId(), "idContenido").getValue())!""/> 
42				<#if contentId ? has_content> 
43					<#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
44					<#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
45								paginaDetalleNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content") 
46					/> 
47					<#if document.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']")?? > 
48						<#assign enlaceExternoNode = document.selectSingleNode("/root/dynamic-element[@name='enlaceExterno']/dynamic-content")/> 
49					<#else> 
50						<#assign enlaceExternoNode = "" /> 
51					</#if> 
52					 
53					<#if enlaceExternoNode?has_content && enlaceExternoNode.getText()?has_content> 
54						<#assign categoryUrl = enlaceExternoNode.getText() 
55						/>            		 
56					<#else> 
57						<#if paginaDetalleNode?has_content && paginaDetalleNode.getText()?has_content> 
58							<#assign  pageDetail = paginaDetalleNode.getText()/> 
59							<#if (pageDetail?index_of("@")>0)> 
60								<#assign pageDetailPosition = (pageDetail?index_of("@")-1) 
61									pageDetail = pageDetail[0..pageDetailPosition] 
62									layoutDetail = layoutLocalService.getLayout(themeDisplay.getScopeGroupId(),false,pageDetail?number)					                          					  
63								/> 
64							</#if> 
65						<#else> 
66							<#assign detailPage = "general-open-data" 
67									layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
68						</#if> 
69							 
70						<#assign categoryUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)/> 
71								${categoryUrl.setParameter("categoryId", childCategory.getCategoryId()+"")} 
72					 
73					</#if> 
74						 
75																	 
76					<#if journalArticleSub?has_content> 
77						<#-- obtener el contenido de la categoría actual -->                         
78						<#assign categoryKey = (assetCategoryPropertyService.fetchCategoryProperty(categoryId, "categoryKey").getValue())!""/> 
79						<#if (categoryKey != "TRANSPARENCIA") && (categoryKey != "OPEN_DATA") > 
80							<#assign childCategoryContent = journalArticleService.getArticleContent(journalArticleSub, "TPL_CATEGORIA_INTERIOR","VIEW", locale, themeDisplay)/>	            
81							<div class="col-md-4"> 
82								<div class="contenedor-interior contenedor-categoria-individual"> 
83									<a href="${categoryUrl}" title="${languageUtil.get(locale,'transparencia.general.more-info-about')} ${childCategory.getTitle(locale)}"	 >			                                                         
84										${childCategoryContent}  
85									</a> 
86								</div> 
87							</div> 
88						<#else>	 
89							<#assign childCategoryContent = journalArticleService.getArticleContent(journalArticleSub, "TPL_CATEGORIA_PORTADA","VIEW", locale, themeDisplay)/>                        
90							<div class="col-md-6 articulo-relacionado contenedor-categoria-individual"> 
91								<div class="contenedor-interior"> 
92									<a href="${categoryUrl}" title="${languageUtil.get(locale,'transparencia.general.more-info-about')} ${childCategory.getTitle(locale)}"	 >			                                                         
93										${childCategoryContent}  
94									</a> 
95								</div> 
96							</div>	 
97							 
98						</#if> 
99					</#if> 
100				</#if> 
101			</#list>                                 
102		</div>        
103    </div>  
104</#if>