INFOCIUTAT | Ajuntament de València - València
S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing: ==> JournalArticleService.fetchArticleByUrlTitle(groupId, urlTitle) [in template "20115#20151#29193927" at line 173, column 44] ---- 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 article = JournalArticleServi... [in template "20115#20151#29193927" at line 173, column 25] ----
1<!--El publicador no hay que configurarlo con la estructura de infociudad, porque sino intenta cargar cada vez todas las fichas de infociudad-->
2<#assign commonUtilsApi =serviceLocator.findService("com.valencia.liferay.common.utils.api.CommonUtilsApi")/>
3
4<#assign liferay_theme = PortletJspTagLibs["/META-INF/liferay-theme.tld"] />
5<@liferay_theme["defineObjects"] />
6<#assign themeRootPath = themeDisplay.getPathThemeRoot() />
7<#assign themeImagesPath = themeDisplay.getPathThemeImages() />
8<#assign catLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
9<#assign catPropLocalService = serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService") />
10<#assign JournalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
11<#assign infoUrl = "/infociudad"/>
12<#assign infoUrlVal = "/infociutat"/>
13<#assign friendlyURL = themeDisplay.getScopeGroup().getFriendlyURL() />
14<#assign currentURL = themeDisplay.getURLCurrent() />
15<#if request.getParameter("p_r_p_categoryId")?has_content>
16
17 <#assign categoryId = request.getParameter("p_r_p_categoryId") />
18 <#assign categoryIdLong = categoryId?number?long />
19 <#assign classLoader = staticUtil["com.liferay.portal.kernel.util.PortalClassLoaderUtil"]/>
20 <#assign categoryValueClass = staticUtil["com.liferay.petra.lang.ClassResolverUtil"].resolve("com.liferay.asset.kernel.model.AssetCategory",classLoader.getClassLoader()) >
21 <#assign dynamicQueryFactory = staticUtil["com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil"] >
22 <#assign dynamicQuery = dynamicQueryFactory.forClass(categoryValueClass, classLoader.getClassLoader()) >
23 <#assign propertyFactory = staticUtil["com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil"]>
24 <#assign VOID = dynamicQuery.add(propertyFactory.forName("parentCategoryId").eq(categoryIdLong))>
25 <#assign results = catLocalService.dynamicQuery(dynamicQuery) >
26 <#assign categoryChilds = results />
27
28 <div class="container publicador-infociudad">
29 <#assign categoriaRecorrida = categoryIdLong >
30 <#assign x=10>
31 <div class="publicador-infociudad-header">
32 <#assign categorias = [] />
33 <#list 1..x as i>
34 <#assign dynamicQueryPadres = dynamicQueryFactory.forClass(categoryValueClass, classLoader.getClassLoader()) >
35 <#assign VOID = dynamicQueryPadres.add(propertyFactory.forName("categoryId").eq(categoriaRecorrida))>
36 <#assign resultsPadres = catLocalService.dynamicQuery(dynamicQueryPadres) >
37 <#assign categoryPadres = resultsPadres />
38 <#if categoryPadres?has_content >
39 <#list categoryPadres as categoryPadre>
40 <#if i == 1 >
41 <h2>${categoryPadre.getTitle(locale)}</h2>
42 </#if>
43 <#assign categoriaRecorrida = categoryPadre.getParentCategoryId() >
44 <#assign categorias = categorias +[categoryPadre] />
45 </#list>
46 </#if>
47
48 </#list>
49 <#assign cont = 1 />
50 <#list categorias?reverse as c>
51 <a class="a-info-cat a-info-cat-icon" href="${c.getCategoryId()}" alt="${c.getTitle(locale)}">
52 <p style="font-family: Montserrat-SemiBold,sans-serif;float:left;font-size:2em;margin-bottom: 0.5rem;font-weight: 500;line-height: 1.2;">${c.getTitle(locale)}</p>
53 <#if cont != categorias?size >
54 <span class='glyphicon glyphicon-chevron-right'></span>
55 </#if>
56 </a>
57 <#assign cont = cont + 1 />
58 </#list>
59 </div>
60 <#assign resultsCount = 0 />
61 <#if categoryChilds?has_content >
62 <#assign resultsCountCat = 0 />
63 <#assign z=0>
64 <#list categoryChilds as categoryChild>
65 <#assign aparece = "true" />
66 <#assign properties = catPropLocalService.getCategoryProperties(categoryChild.getCategoryId())>
67 <#if properties?has_content>
68 <#list properties as p>
69 <#if p.getKey() == "Visible">
70 <#assign aparece = catPropLocalService.getCategoryProperty(categoryChild.getCategoryId(), "Visible").getValue() >
71 </#if>
72 </#list>
73 </#if>
74 <#if aparece == "true">
75 <#assign resultsCountCat = resultsCountCat + 1 />
76 <#if z%2 == 0>
77 <#if z == 0>
78 <div class="row row-recurso">
79 <#else>
80 </div>
81 <div class="row row-recurso">
82 </#if>
83 </#if>
84 <div class="col-md-5 col-sm-12 recurso">
85 <a href='${categoryChild.getCategoryId()}' alt='${categoryChild.getTitle(locale)}'>
86 <div class="recurso-imagen">
87 <img src="/documents/20142/21327443/articulo.svg/d1e8b7f4-5ef6-d26d-6fc0-dfb6e26f00b8?t=1671699607767" style="width:40px;height:50px;" alt=""/>
88 <h3 class="mt-4">${categoryChild.getTitle(locale)}</h3>
89 </div>
90 </a>
91 </div>
92 <#if categoryChild?is_last>
93 </div>
94 </#if>
95 <#assign z++>
96 </#if>
97 </#list>
98 <#assign resultsCount = resultsCount + resultsCountCat />
99 </#if>
100
101 <!--El CommonUtils ya devuelve los journalArticles que hay que pintar, solo comprobar expirados-->
102 <#assign entries = commonUtilsApi.findInfociudadArticlesByCategory(categoryIdLong,categoryChilds,locale,renderRequest)/>
103 <#if entries?has_content>
104 <#assign entriesCount = 0 />
105 <#assign z = 0>
106 <#list entries as entryId>
107 <#if entryId?? && entryId != 0 >
108
109 <#attempt>
110 <#assign article = JournalArticleService.fetchLatestArticle(getterUtil.getLong(entryId),0) />
111 <#if article?? && JournalArticleService.isLatestVersion(article.getGroupId(), article.getArticleId(), article.getVersion())>
112
113 <#assign rootElement = saxReaderUtil.read(article.getContentByLocale(locale)).getRootElement() />
114 <#assign selector = saxReaderUtil.createXPath("dynamic-element[@name='titulo']") />
115 <#assign titulo = selector.selectSingleNode(rootElement).getStringValue()?replace("\"", "") />
116 <#assign entriesCount = entriesCount + 1 />
117 <#if z%2 == 0>
118 <#if z == 0>
119 <div class="row row-recurso">
120 <#else>
121 </div>
122 <div class="row row-recurso">
123 </#if>
124 </#if>
125 <div class="col-md-5 col-sm-12 recurso">
126 <a href="/-/${article.getUrlTitle(locale)}" alt="${article.getTitle(locale)}">
127 <div class="recurso-imagen">
128 <img src="/documents/20142/21327443/url.svg/b5446b33-b350-9f55-108c-f88d683ac9e5?t=1671699609810" style="width:40px;height:50px;" alt=""/>
129 <h3 class="mt-4">${titulo}</h3>
130 </div>
131 </a>
132 </div>
133 <#assign z++>
134
135 </#if>
136 <#recover>
137 <#continue>
138 </#attempt>
139
140 </#if>
141
142 <#if entryId?is_last>
143 </div>
144 </#if>
145 </#list>
146 <#assign resultsCount = resultsCount + entriesCount />
147 </#if>
148 <div style="margin-top:1em;">
149 <#if locale == "es_ES">
150 <span class="pl-2">${resultsCount} documentos encontrados.</span>
151 <#else>
152 <span class="pl-2">${resultsCount} documents trobats.</span>
153 </#if>
154 </div>
155 </div>
156<#else>
157 <#if currentURL?contains("/-/") >
158 <#assign urlTitle = currentURL[currentURL?last_index_of("/-/")+3..] />
159 <#if urlTitle?starts_with("asset_publisher")>
160 <#if urlTitle?last_index_of("?") == -1>
161 <#assign urlTitle = urlTitle[urlTitle?last_index_of("/content/")+9..] />
162 <#else>
163 <#assign urlTitle = urlTitle[urlTitle?last_index_of("/content/")+9..urlTitle?last_index_of("?")-1] />
164 </#if>
165 <#else>
166 <#if urlTitle?last_index_of("?") != -1>
167 <#assign urlTitle = urlTitle[0..urlTitle?last_index_of("?")-1] />
168 </#if>
169 </#if>
170 <#if JournalArticleService.fetchLatestArticleByUrlTitle(groupId, urlTitle,0)??>
171 <#assign article = JournalArticleService.fetchLatestArticleByUrlTitle(groupId, urlTitle,0) />
172 <#else>
173 <#assign article = JournalArticleService.fetchArticleByUrlTitle(groupId, urlTitle) />
174 </#if>
175 <#if article??>
176 <@liferay_journal["journal-article"]
177 articleId=article.getArticleId()
178 groupId=article.getGroupId()
179 />
180 </#if>
181 </#if>
182</#if>
183<style>
184.recurso {
185 float: left;
186 margin: 1em 2em 0em 1em;
187 position: relative;
188 width: 100%;
189 height: auto;
190 min-height: 75px;
191 overflow: hidden;
192 text-align: center;
193 padding: 10px;
194 border: 1px solid #eee;
195 border-radius: 5px;
196 box-shadow: 3px 3px 8px #ccc;
197}
198
199.recurso:hover {
200 text-decoration: underline;
201}
202
203.recurso img{
204 float: left;
205}
206.recurso h3 {
207 font-family: 'Montserrat', 'Calibri', Arial, Helvetica, sans-serif;
208 text-transform: uppercase;
209 margin-left: 0;
210 padding: 1em;
211 height: auto;
212 color: #000;
213 font-size: 0.8rem;
214 line-height: 130%;
215 text-align: left;
216 box-sizing: border-box;
217 font-weight: 600;
218 text-shadow: none;
219 display: table-cell;
220 vertical-align: middle;
221 width: calc(100% - 50px);
222}
223
224.recurso-imagen {
225 vertical-align: middle;
226
227}
228.recurso > div p {
229 font-size: 0.7em;
230 color: #333;
231 text-align: left;
232 line-height: 140%;
233 height: auto;
234 padding: 1em;
235 margin: 0;
236 max-height: fit-content;
237}
238
239.row-recurso {
240 list-style:none;
241}
242
243@media only screen and (min-width: 1224px) {
244.row-recurso{
245 margin-left: 5em;
246}
247}
248
249</style>
250<script>
251 $(document).ready(function() {
252 var pageUrl = document.location.pathname;
253 if (!pageUrl.includes("/asset_publisher/dFPWlHhXaSZ7/")) {
254 $('#portlet_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_Qgz8ni2Ffjm5').hide();
255 }
256 $('a[href*="guia_accesibilidad.nsf"]').parent().hide();
257 //$("h4:contains('Servicios/Actividades:')").parent().hide();
258 });
259</script>
Cerques en Infociutat
Localització d'equipaments pel seu nom o a partir d'alguna paraula inclosa en la seua descripció o contingut.
Codi: sweb742:8080: