Notícies Destacades | Ajuntament de València - València
Cerca de notícies
Cerca per dia
Últimes notícies
Codi: sweb742:8080:
S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing: ==> serviceLocator.findService("com.valencia.liferay.common.utils.api.CommonUtilsApi") [in template "20115#20151#605968" at line 95, column 28] ---- 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 commonUtilsApi = serviceLocat... [in template "20115#20151#605968" at line 95, column 3] ----
1<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()>
2<#assign themeDisplay = serviceContext.getThemeDisplay() />
3<#assign url = themeDisplay.getURLPortal() + themeDisplay.getURLCurrent() />
4<#assign httpServletRequest = serviceContext.getRequest()>
5<#attempt>
6 <#assign universalIdParam = httpServletRequest.getParameter('uid') />
7<#recover>
8 <#assign universalIdParam = "" />
9</#attempt>
10
11<#assign portletRequestModel = objectUtil("com.liferay.portal.kernel.portlet.PortletRequestModel", renderRequest, renderResponse) />
12
13<#if universalIdParam?has_content >
14 <#assign universalId = universalIdParam >
15<#else>
16 <#assign universalId = "" >
17
18</#if>
19
20<#if universalId?has_content>
21<#assign expandoService = serviceLocator.findService("com.liferay.expando.kernel.service.ExpandoColumnLocalService") />
22<#assign commonUtilsApi =serviceLocator.findService("com.valencia.liferay.common.utils.api.CommonUtilsApi")/>
23<#assign defaultColumn = expandoService.getDefaultTableColumn(themeDisplay.getCompanyId(), "com.liferay.journal.model.JournalArticle", "universalid") >
24
25
26<#assign classLoader = staticUtil["com.liferay.portal.kernel.util.PortalClassLoaderUtil"]/>
27<#assign expandoValueClass = staticUtil["com.liferay.petra.lang.ClassResolverUtil"].resolve("com.liferay.expando.kernel.model.ExpandoValue",classLoader.getClassLoader()) >
28<#assign dynamicQuery = dynamicQueryFactory.forClass(expandoValueClass, classLoader.getClassLoader()) >
29<#assign VOID = dynamicQuery.add(propertyFactory.forName("tableId").eq(defaultColumn.getTableId())).add(propertyFactory.forName("data").eq(universalId))>
30<#assign results = expandoService.dynamicQuery(dynamicQuery) >
31
32<#if results?has_content>
33 <#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
34
35 <#list results as result>
36 <#if result?is_last>
37 <#assign article = journalArticleLocalService.fetchArticle(result.getClassPK()) >
38 <#assign html = journalArticleLocalService.getArticleContent(article.getGroupId(),article.getArticleId(),"view", article.getDDMTemplateKey(), locale?string, portletRequestModel,themeDisplay) />
39 </#if>
40 </#list>
41
42 <div>
43 ${html}
44 </div>
45</#if>
46<#-- incluyo contenido relacionado -->
47<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
48<#assign AssetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService") />
49
50
51<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
52<#assign journalId = .vars['reserved-article-id'].data/>
53
54<#attempt>
55<#assign article = JournalArticleLocalService.fetchArticle( groupId ,journalId) >
56<#recover>
57</#attempt>
58
59<#if article??>
60<#assign journalArticleClassname = "com.liferay.journal.model.JournalArticle" >
61<#assign articleEntry = AssetEntryLocalService.getEntry(journalArticleClassname, article.getResourcePrimKey())>
62<#assign articleRelatedEntries = AssetLinkLocalService.getDirectLinks(articleEntry.getEntryId()) >
63
64<#if articleRelatedEntries?has_content>
65
66<#assign relatedTemplateKey = "38113" >
67
68<#list articleRelatedEntries as relatedAsset>
69 <#assign relatedEntry = AssetEntryLocalService.getEntry(relatedAsset.getEntryId2()) >
70 <#assign entryClassPK = relatedEntry.getClassPK() >
71
72 <#assign journalArticleClassname = "com.liferay.journal.model.JournalArticle" >
73 <#if journalArticleClassname==relatedEntry.getClassName()>
74
75 <#assign relatedArticle = JournalArticleLocalService.fetchLatestArticle(entryClassPK) >
76 <#if relatedArticle.getDDMTemplateKey() == relatedTemplateKey >
77 <#assign relatedArticleContent = JournalArticleLocalService.getArticleContent(relatedArticle, relatedArticle.getDDMTemplateKey(), "view", locale,portletRequestModel, themeDisplay)>
78
79 <div class="bloque-cuadro">
80 <h3 class="titulo-bloque"><@liferay.language key="informacion_adicional" /></h3>
81 <#assign urlNew = commonUtilsApi.replaceUrlWithUID("${themeDisplay.getURLCurrent()}",relatedArticleContent)/>
82 <div class="col-12 pb-3" >${relatedArticleContent}</div>
83 </div>
84
85 </#if>
86 </#if>
87</#list>
88</#if>
89 <#-- Fin contenido relacionado -->
90</#if>
91</#if>
92
93
94<#if !universalId?has_content>
95 <#assign commonUtilsApi =serviceLocator.findService("com.valencia.liferay.common.utils.api.CommonUtilsApi")/>
96 <#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
97 <#assign urlTotal=themeDisplay.getURLCurrent() />
98 <#assign urlSubstring=urlTotal?substring(urlTotal?last_index_of("/-/content/"), urlTotal?length)?replace("/-/content/", "") />
99 <#if (urlTotal?contains("?fbclid="))>
100 <#assign urlSubstring=urlTotal?substring(urlTotal?last_index_of("/-/content/"), urlTotal?last_index_of("?fbclid="))?replace("?fbclid=", "")?replace("/-/content/", "") />
101 <#else>
102 <#assign urlSubstring=urlTotal?substring(urlTotal?last_index_of("/-/content/"), urlTotal?length)?replace("/-/content/", "") />
103 </#if>
104 <!--urlSubstring: ${urlSubstring} -->
105 <#if journalArticleLocalService.fetchLatestArticleByUrlTitle(groupId, urlSubstring,0)??>
106 <#assign article = journalArticleLocalService.fetchLatestArticleByUrlTitle(groupId, urlSubstring,0) />
107 <#assign html = journalArticleLocalService.getArticleContent(article.getGroupId(),article.getArticleId(),"view", article.getDDMTemplateKey(), locale?string, portletRequestModel,themeDisplay) />
108 <div>
109 ${html}
110 </div>
111 </#if>
112 <#-- incluyo contenido relacionado -->
113
114 <#-- Fin contenido relacionado -->
115</#if>
116
117<style>
118
119 .bloque-cuadro{
120 border:3px solid;
121 border-color:#dadada;
122 padding-left:15px;
123 padding-right:15px;
124 margin-top:15px;
125 }
126
127 .titulo-bloque{
128 margin-top: 3%;
129 margin-bottom: 3%;
130 color:4C4C4C;
131 }
132 #p_p_id_CalendarAc_INSTANCE_iWBt6iPSuFjM_,
133 #p_p_id_CalendarCm_INSTANCE_BkHCdfQtrEVh_ {
134 display: none;
135 }
136</style>