Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> normalizeRichText [in template "20097#20123#41843" at line 115, column 67]
----
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: ${normalizeRichText(replaceSiteURL(cu... [in template "20097#20123#41843" at line 115, column 65]
----
1<#include "${templatesPath}/IM-BASE" />
2<#include "${templatesPath}/IM-BASE-DATE-HELPER">
3<#include "${templatesPath}/IM-BASE-HTML-HELPER">
4<#include "${templatesPath}/IM-BASE-JOURNAL-LANGUAGE-PROPERTIES">
5<#include "${templatesPath}/IM-BASE-EXPANDO-PAGE-NAME-HTML">
6
7<#assign portalUrl = themeDisplay.getPortalURL() />
8<#assign currentUrl = portalUrl + themeDisplay.getURLCurrent() />
9
10
11<#assign portlet_id = themeDisplay.getPortletDisplay().getId()>
12<!-- Poner un ancla -->
13<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
14<#assign journalArticleResourceLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService") />
15
16<#function getJournalArticle resourcePrimKey>
17 <#attempt>
18 <#local journal = journalArticleLocalService.getLatestArticle(resourcePrimKey, 0) />
19 <#return journal />
20 <#recover >
21 </#attempt>
22 <#return "" />
23</#function>
24
25<#function getJournalArticleByJsonElement elementJson>
26 <#attempt>
27 <#local resourcePrimKey = elementJson.classPK?number />
28 <#local journal = getJournalArticle(resourcePrimKey) />
29 <#return journal />
30 <#recover >
31 </#attempt>
32 <#return "" />
33</#function>
34
35<#function getJournalArticleRootElement journal>
36 <#attempt>
37 <#if journal?has_content>
38 <#local journalLocaleContent = journal.getContentByLocale(locale.toString()) />
39 <#local journalContentXml = saxReaderUtil.read(journalLocaleContent) />
40 <#local rootElementContent = journalContentXml.getRootElement() />
41 <#if rootElementContent?? && rootElementContent?has_content>
42 <#return rootElementContent />
43 </#if>
44 </#if>
45 <#recover >
46 </#attempt>
47 <#return "" />
48</#function>
49
50<#function getXmlTextElement rootElementContent fieldReference>
51 <#attempt>
52 <#local xPathSelector = saxReaderUtil.createXPath("dynamic-element[@field-reference='" + fieldReference + "']") />
53 <#local element = xPathSelector.selectSingleNode(rootElementContent) />
54 <#return element.getStringValue()?trim />
55 <#recover >
56 </#attempt>
57 <#return "" />
58</#function>
59
60<#assign webContentData = jsonFactoryUtil.createJSONObject(ContenidoTitulo.getData())/>
61
62 <#assign siteGroupId = themeDisplay.getScopeGroupId() />
63
64 <#if siteGroupId == 20121 || siteGroupId == 38303 || siteGroupId == 20123>
65 <#if webContentData?? && webContentData.title??>
66 <#assign journal =getJournalArticleByJsonElement(webContentData) />
67 <#assign journalRootElement = getJournalArticleRootElement(journal) />
68 <#if journalRootElement?has_content>
69 <#assign contenido = getXmlTextElement(journalRootElement, "content") />
70 <#assign tituloH = removeFirstPHtmlTag(contenido) />
71 <#if tituloH?contains("<h2")>
72 ${tituloH}
73 <#else>
74 <h2>${tituloH}</h2>
75 </#if>
76 </#if>
77 <#else>
78 <h2>${getPageNameLayout(themeDisplay.getLayout())}</h2>
79 </#if>
80 <#else>
81 <#if (Titulo.getData())??>
82 <h2>${Titulo.getData()}</h2>
83 </#if>
84 </#if>
85
86<p class="sr-only">Para ver más información, pulse sobre los elementos con signo +</p>
87
88<#if Contenido.getData()?has_content>
89 <div class="list-im">
90 ${Contenido.getData()}
91 </div>
92</#if>
93
94<#if SeccionAcordeon.getSiblings?? && SeccionAcordeon.getSiblings()?has_content>
95 <div class="acordeon" id="${portlet_id}">
96 <#assign cont = 0>
97 <#list SeccionAcordeon.getSiblings() as cur_SeccionAcordeon>
98 <#if cur_SeccionAcordeon.getData()??>
99 <#assign cont++>
100 <div class="card" id="ancla${cont}">
101 <div class="card-header" id="${portlet_id}-${cont}">
102 <h3 class="mb-0">
103 <a aria-controls="collsec-${portlet_id}-${cont}" aria-expanded="false" data-toggle="collapse" href="#collsec-${portlet_id}-${cont}" role="button">
104 <#if cur_SeccionAcordeon.TituloAcronimo?? && cur_SeccionAcordeon.TituloAcronimo.getData()?has_content>
105 ${cur_SeccionAcordeon.TituloAcronimo.getData()}
106 <#else>
107 ${replaceSiteURL(cur_SeccionAcordeon.getData())}
108 </#if>
109 </a>
110 </h3>
111 </div>
112 <div id="collsec-${portlet_id}-${cont}" class="collapse collsec-detail" aria-labelledby="${portlet_id}-${cont}" data-parent="#${portlet_id}" role="region">
113 <div class="card-body">
114 <div class="list-im">
115 ${normalizeRichText(replaceSiteURL(cur_SeccionAcordeon.ContenidoAcordeon.getData()))}
116 </div>
117 </div>
118 </div>
119 </div>
120 </#if>
121 </#list>
122 </div>
123</#if>
124
125<@fechaActualizacionJournalHide/>
126
127<!-- RSPEAK_STOP -->
128<div class="rs_preserve rs_skip_always">
129<script>
130$(function() {
131 var currentURL = window.location.href;
132 var anclaString = "#ancla";
133 var anclaIndex = currentURL.indexOf(anclaString);
134 if (anclaIndex >= 0) {
135 var numAnclaIndex = anclaIndex + anclaString.length;
136 var numAncla = currentURL.substring(numAnclaIndex);
137 var idCollapseAncla = "#collsec-${portlet_id}-" + numAncla;
138 var collapseAncla = $(idCollapseAncla);
139 if (collapseAncla.length) {
140 collapseAncla.collapse('show');
141 $('html, body').animate({
142 scrollTop: collapseAncla.offset().top - 260
143 }, 400);
144 }
145 }
146
147 $('.collsec-detail').on('shown.bs.collapse', function(event) {
148 $('html, body').animate({
149 scrollTop: $(event.target).parent().offset().top - 260
150 }, 400);
151 });
152});
153</script>
154</div>
155<!-- RSPEAK_START -->