Consellera d’Habitatge, Obres Públiques i Vertebració del Territori

S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing:
==> current_formatted_url[3]  [in template "10155#10193#166460530" at line 43, column 23]

----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign pagina = current_formatted_ur...  [in template "10155#10193#166460530" at line 43, column 5]
----
1<#ftl output_format="HTML"> 
2<#--  
3* Autor: Andrea Olivero 
4* Fecha Inicio: 12/05/2021 
5* Formato migracion: freemarker (ftl) 
6* Fecha Finalizacion: 14/07/2021 
7--> 
8 
9<#assign reserved_article_title = "${.vars['reserved-article-title'].data}"/> 
10<#assign reserved_article_id = "${.vars['reserved-article-id'].data}"/> 
11<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")/> 
12<#assign scopeId = themeDisplay.getScopeGroupId()/> 
13<#assign articlePrimKey = journalArticleLocalService.getArticle(scopeId,reserved_article_id).resourcePrimKey/> 
14<#assign catLocalService =  serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")/> 
15<#assign articleCatNames = catLocalService.getCategoryIds("com.liferay.journal.model.JournalArticle", articlePrimKey)/> 
16<#assign assetEntryQuery = objectUtil("com.liferay.asset.kernel.service.persistence.AssetEntryQuery")/> 
17<#assign assetEntryQuerye = objectUtil("com.liferay.asset.kernel.service.persistence.AssetEntryQuery")/> 
18<#assign rfu = objectUtil("com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil")/> 
19<#assign AssetCategoryLocalService =  serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")/> 
20<#assign classUtil = staticUtil["freemarker.template.utility.ClassUtil"]/> 
21<#assign dqfu = objectUtil("com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil")/> 
22<#assign classLoader = staticUtil["com.liferay.portal.kernel.util.PortalClassLoaderUtil"]/> 
23<#assign paramUtil = objectUtil("com.liferay.portal.kernel.util.ParamUtil")/> 
24<#assign projection = objectUtil("com.liferay.portal.kernel.dao.orm.ProjectionFactoryUtil")/> 
25 
26 
27<div class="webContent"> 
28 
29    <#if reserved_article_title?? && reserved_article_title?has_content> 
30        <p class="header10">${reserved_article_title}</p> 
31    </#if> 
32     
33    <#assign CategoriaDocumentos = ["Articulo de opinion", "Entrevista", "Intervención parlamentaria"]/> 
34     
35    <#assign gva = "https://www.gva.es/"/> 
36    <#assign idioma = "va"/> 
37    <#assign gvalink = "/inicio/la_administracion_valenciana/lav_consellerias/lav_con_curriculum?id="/> 
38    <#assign current_url = themeDisplay.getURLCurrent()/> 
39    <#assign current_formatted_url = current_url?split("/?")/> 
40    <#assign current_formatted_url = current_formatted_url[0]?split("/")/> 
41    <#assign cute_url = "/"+current_formatted_url[1]+"/"+current_formatted_url[2]+"/"/> 
42     
43    <#assign pagina = current_formatted_url[3]/> 
44   
45     
46    <#--Si la URL contiene el idioma, añadir una ruta mas--> 
47    <#if current_formatted_url[1] == "es" || current_formatted_url[1] == "va" || current_formatted_url[1] == "ca" || current_formatted_url[1] == "en"> 
48        <#assign cute_url = cute_url + current_formatted_url[3]+"/"/> 
49        <#assign pagina = current_formatted_url[3]/> 
50         
51        <#--Si la URL contiene /web, añadir dos rutas más--> 
52    	<#if current_formatted_url[1] == "web">  
53    		<#assign cute_url = cute_url + current_formatted_url[4]+"/"+current_formatted_url[5]+"/"/> 
54    		<#assign pagina = current_formatted_url[6]/> 
55    	</#if> 
56     
57    <#elseif current_formatted_url[1] == "web"> 
58    	<#-- Si la URL contiene /web, añadir dos rutas más--> 
59    	<#assign cute_url = cute_url + current_formatted_url[3]+"/"+current_formatted_url[4]+"/"/> 
60    	<#assign pagina = current_formatted_url[5]/> 
61    </#if> 
62     
63    <#if current_formatted_url[1] == "es"> 
64    	<#assign idioma = "es"/> 
65    </#if> 
66     
67    <#assign new_url = cute_url?split("?")/> 
68    <#assign cute_url = new_url[0]/> 
69    <#assign cute_gva = gva+idioma+gvalink/> 
70     
71    <#-- SACAR TITULO PÁGINA PARA COMPARARLA Y PINTAR EN NEGRITA EL MENU--> 
72    <#if Img_Conseller?? && Img_Conseller.getData()?has_content> 
73		<img alt="" src="${Img_Conseller.getData()?no_esc}" style="width: 95px; height: 95px; float: right;" /> 
74	</#if> 
75	<#if Nombre?? && Nombre.getData()?has_content> 
76		<h2 style="margin:5px 0 10px 0">${Nombre.getData()?no_esc}</h2> 
77	</#if> 
78	<#if Cargo?? && Cargo.getData()?has_content> 
79		<p>${Cargo.getData()?no_esc}</p> 
80	</#if> 
81  
82	<h3><@liferay.language key="argos.consell.documents" /></h3> 
83     
84    <#-- PINTAR MENU--> 
85    <div class="nav_documentos_asociados"> 
86    	<ul> 
87     
88            <#list CategoriaDocumentos as categoria> 
89            	<#assign q1 = dqfu.forClass(classUtil.forName("com.liferay.asset.kernel.model.AssetCategory"),classLoader.getClassLoader())/> 
90            	<#assign catName = rfu.eq( "name", categoria)/> 
91            	<#assign D = q1.add(catName)/> 
92            	<#assign D = q1.setProjection(projection.property("categoryId"))/> 
93            	<#assign CatListDQ = AssetCategoryLocalService.dynamicQuery(q1)/> 
94				<#assign cat = CatListDQ[0]/> 
95            	 
96        		 
97        		<#assign contador = 0/> 
98         
99        		<#assign tienePermisos = permissionChecker.hasPermission(groupId, "com.liferay.asset.kernel.model.AssetCategory", cat, "VIEW")/> 
100         
101        		<#if tienePermisos!=false>	 
102        			<#assign arr = assetEntryQuery.getAllCategoryIds()/> 
103         
104        			<#list articleCatNames as categoria_name> 
105        				<#assign arr = arr + [categoria_name]/> 
106        			</#list> 
107        			 
108        			<#assign arr = arr + [cat]/> 
109        			<#assign A = assetEntryQuerye.setAllCategoryIds(arr)/> 
110         
111        			<#assign acsUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")/> 
112        			<#assign assetEntryList = acsUtil.getEntries( assetEntryQuerye )/> 
113        			<#assign contador = assetEntryList?size/> 
114        		</#if> 
115        		 
116        		<#if contador != 0> 
117        			<#if categoria == "Entrevista"> 
118        				<#assign enlace = "entrevistes"/> 
119        			<#elseif categoria == "Articulo de opinion"> 
120        				<#assign enlace = "articles-d-opinio"/> 
121        			<#else> 
122        				<#assign enlace = "intervencions-parlamentaries"/> 
123        			</#if> 
124        			 
125        			<li> 
126        				<a href="${cute_url}${enlace}" style="text-decoration:none">   
127							<#if pagina == enlace> 
128								<#if enlace == "articles-d-opinio" && idioma == "va"> 
129									<strong> Articles d'opinió (${contador}) </strong> 
130								<#else> 
131									<strong> <@liferay.language key="argos.consell.${enlace}"/>${contador}</strong> 
132								</#if> 
133							<#elseif enlace == "articles-d-opinio" && idioma == "va"> 
134									Articles d'opinió (${contador}) 
135							<#else> 
136									<@liferay.language key="argos.consell.${enlace}" />(${contador}) 
137							</#if>				 
138        				</a> 
139        			</li> 
140        		</#if> 
141            </#list> 
142    	</ul> 
143    </div> 
144</div> 

Intervencions parlamentàries