-
Aqualia Colombia
> Actualidad
>
Avisos
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> serviceLocator.findService("com.liferay.portal.kernel.xml.SAXReaderUtil") [in template "12187455#12187494#29994684" at line 14, column 66]
----
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 saxReaderUtil = serviceLocato... [in template "12187455#12187494#29994684" at line 14, column 41]
----
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
2<#assign current_article_url = themeDisplay.getURLCurrent() />
3<#assign twitter_username = "@FCC_Group" />
4<#assign group_id = themeDisplay.getScopeGroupId() />
5
6 <#if current_article_url?contains("/-/") && !current_article_url?contains("asset_publisher")>
7 <#assign article_url = current_article_url[current_article_url?index_of('/-/')+3..] />
8
9 <#if validator.isNotNull(journalArticleLocalService.getArticleByUrlTitle(group_id, "${article_url}")) >
10
11 <#assign articleimage = journalArticleLocalService.getArticleByUrlTitle(group_id, "${article_url}") />
12
13 <#if articleimage.getDDMStructure().getNameCurrentValue() == "EST_NOTICIA">
14 <#assign saxReaderUtil = serviceLocator.findService("com.liferay.portal.kernel.xml.SAXReaderUtil") />
15 <#assign dlAppLocalServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService") />
16 <#assign jsonFactoryUtil = serviceLocator.findService("com.liferay.portal.kernel.json.JSONFactoryUtil") />
17 <#assign document = saxReaderUtil.read(articleimage.getContentByLocale(locale)) />
18 <#assign document_root = document.getRootElement() />
19 <#if validator.isNotNull(document.selectSingleNode("//dynamic-element[@name='txt_titulo']/dynamic-content")) >
20 <#assign title = document.selectSingleNode("//dynamic-element[@name='txt_titulo']/dynamic-content").getText() />
21 <#else>
22 <#assign title = "" />
23 </#if>
24
25 <#if validator.isNotNull(document.selectSingleNode("//dynamic-element[@name='txt_entradilla']/dynamic-content")) >
26 <#assign description = document.selectSingleNode("//dynamic-element[@name='txt_entradilla']/dynamic-content").getText() />
27 <#else>
28 <#assign description = title/>
29 </#if>
30 <#if validator.isNotNull(document.selectSingleNode("//dynamic-element[@name='txt_titulo']/dynamic-content")) && validator.isNotNull(document.selectSingleNode("//dynamic-element[@name='txt_entradilla']/dynamic-content"))>
31 <#assign xpath_selector = saxReaderUtil.createXPath("dynamic-element[@name='Imagen_destacada']") />
32 <#assign filterone = xpath_selector.selectSingleNode(document_root) />
33 <#assign filtered = filterone.getStringValue() />
34 <#assign jsonfilter = jsonFactoryUtil.createJSONObject(filtered) />
35 <#assign imageuuid = jsonfilter.getString('uuid') />
36 <#assign imname = jsonfilter.getString('title') />
37 <#assign filentry = dlAppLocalServiceUtil.getFileEntryByUuidAndGroupId(imageuuid, group_id) />
38 <#assign twitter_image_url = "${themeDisplay.getPortalURL()}/documents/${group_id}/${filentry.getFolderId()}/${imname}/${imageuuid}" />
39
40 <meta name="twitter:card" content="summary_large_image">
41 <meta name="twitter:site" content="${twitter_username}">
42 <meta name="twitter:creator" content="${twitter_username}">
43 <meta name="twitter:title" content="${title}">
44 <meta name="twitter:description" content="${htmlUtil.extractText(description)}">
45 <meta name="twitter:image" content="${twitter_image_url}" />
46 </#if>
47
48 </#if>
49 </#if>
50
51 </#if>