Publicador de contenidos
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> themeDisplay.getURLCurrent()?split("type=")[1]  [in template "20115#20151#3578915" at line 89, column 63]

----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to be 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 txtTag = themeDisplay.getURLC...  [in template "20115#20151#3578915" at line 89, column 45]
----
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
2<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
3<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
4<#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") /> 
5<#assign assentEntryLocalService = serviceLocator.findService('com.liferay.asset.kernel.service.AssetEntryLocalService')/> 
6 
7<#assign commonServiceApiService = serviceLocator.findService("es.juntadeandalucia.cma.global.common.services.api.CommonServiceApi")/> 
8<#assign getDDMStructureService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")/> 
9<#assign propertyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService") /> 
10 
11<#assign currentArticle = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
12<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() /> 
13<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
14<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
15<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) /> 
16 
17 
18<div class="evr-wrapper"> 
19    <section class="evr-article-layout"> 
20        <div class="reflex-container-full"> 
21            <div class="reflex-col-xs-12"> 
22                <p class="evr-article-layout__title"><@liferay.language key="no.te.vayas.sin" /> <span class="evr-ntvs__txt">${.vars['reserved-article-title'].data}</span></p> 
23            </div> 
24            <#if ImagenNTVS??> 
25                <div class="reflex-col-md-5 reflex-col-lg-5 reflex-col-sm-12 reflex-col-xs-12"> 
26                    <#if ImagenNTVS.getSiblings()?has_content> 
27                        <#list ImagenNTVS.getSiblings() as cur_ImagenNTVS> 
28                            <#if cur_ImagenNTVS.getData()?? && cur_ImagenNTVS.getData() != ""> 
29								<#assign curImage = cur_ImagenNTVS.getData() /> 
30								<#if curImage != ""> 
31									<#if curImage?contains("/medioambiente/portal")> 
32										<#assign curImage = curImage /> 
33									<#elseif curImage?contains("/medioambiente")> 
34										<#assign curImage = curImage?replace("/medioambiente", "/medioambiente/portal") /> 
35									<#else> 
36										<#assign curImage = "/medioambiente/portal" + curImage /> 
37									</#if> 
38								</#if> 
39                                <img alt="${cur_ImagenNTVS.getAttribute("alt")}" data-fileentryid="${cur_ImagenNTVS.getAttribute("fileEntryId")}" src="${curImage}" /> 
40                            <#else> 
41                                <img alt="no-image" />" src="/medioambiente/portal/o/ventana-theme/images/fotoNoDisponible.jpg" style="width: 100%;" /> 
42                            </#if> 
43                        </#list> 
44                    </#if> 
45                </div> 
46            </#if> 
47            <div class="reflex-col-md-6 reflex-col-lg-6 reflex-col-sm-12 reflex-col-xs-12"> 
48                <div class="evr-article-layout__section"> 
49                    <div class="evr-article-layout__paragraph"> 
50                        <p class="evr-article-layout__txt"> 
51                            ${textoEstructuraBasico.getData()} 
52                        </p> 
53                    </div> 
54                </div> 
55                <div> 
56                    <#if currentArticleRelatedLinks?has_content> 
57                        <div class="evr-article-layout__tags"> 
58                            <div class="evr-tags"> 
59                                <ul class="evr-tags__list"> 
60 
61                                    <#list currentArticleRelatedLinks as related_entry> 
62                                        <#if related_entry?is_first> 
63                                            <#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
64                                            <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
65                                            <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
66                                            <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) /> 
67                                            <#assign relatedArticleId = relatedArticle.getArticleId() /> 
68                                            <#assign atricleGroupId = relatedArticle.getGroupId() /> 
69 
70                                            <#assign smallImage = relatedArticle.getSmallImageURL() /> 
71                                            <#assign currentGroupSite = themeDisplay.getLayout().getGroup().getFriendlyURL()  /> 
72                                            <#assign structure = relatedArticle.getDDMStructure().getName(locale) /> 
73                                            <#assign articleURL = groupLocalService.fetchGroup(atricleGroupId).getFriendlyURL() /> 
74                                        <#--  Inicio Get enlace  --> 
75                                            <#assign classNameWebContent = "com.liferay.journal.model.JournalArticle"/> 
76                                            <#assign classPKWebContent = relatedArticle.getResourcePrimKey()?number/> 
77                                            <#assign webContent = assentEntryLocalService.fetchEntry(classNameWebContent,classPKWebContent)/> 
78                                            <#assign entryId = webContent.getEntryId()/> 
79                                            <#assign entryClassPK = webContent.getClassPK()/> 
80                                            <#assign enlace = commonServiceApiService.getEnlaceVentana(themeDisplay,entryClassPK,entryId)> 
81                                        <#--  Fin get enlace  --> 
82 
83                                            <#if themeDisplay.getLayout().getPrivateLayout() == true > 
84                                                <#assign state = themeDisplay.getPathFriendlyURLPrivateGroup()/> 
85                                            <#else> 
86                                                <#assign state = themeDisplay.getPathFriendlyURLPublic()/> 
87                                            </#if> 
88                                            <#assign friendlyURL = themeDisplay.getPortalURL() + state + articleURL /> 
89                                            <#assign txtTag = themeDisplay.getURLCurrent()?split("type=")[1] /> 
90                                            <#assign txtTagDecode = htmlUtil.escape(txtTag) /> 
91                                            <li class="evr-tags__item"> 
92												<i class="evr-tags__icon fa fa-tag"></i> 
93                                                <a class="" href="${enlace}">                                                    
94                                                    <div class="evr-tags__body"> 
95                                                        <span class="evr-tags__txt">${txtTag?replace("%20", " ")} &middot; ${relatedArticle.getTitle(locale)}</span> 
96                                                    </div> 
97                                                </a> 
98                                            </li> 
99                                        </#if> 
100                                    </#list> 
101                                </ul> 
102                            </div> 
103                        </div> 
104                    </#if> 
105                </div> 
106            </div> 
107        </div> 
108    </section> 
109</div> 
110<br> 
111<br> 
112 
113<#----------------------------- STYLES ZONE --------------------------------------> 
114<script> 
115    var noCapitalizeTile2 = $('.evr-ntvs__txt')[0].innerText; 
116 
117    var eliminateEnes =  noCapitalizeTile2.replace(/ñ/g, "x"); 
118    var eliminateAccents = eliminateEnes.replace("Á","AA").replace("á", "aa").replace("É","EE").replace("Í","II").replace("Ó", "OO").replace("Ú","UU").replace("é", "ee").replace("í","ii").replace("ó","oo").replace("ú", "uu").replace("Rf", "rf"); 
119    noCapitalizeTile2 = capitalizeFirstLetters(eliminateAccents); 
120    noCapitalizeTile2 = noCapitalizeTile2.replace(/ñ/g, "x").replace("AA","Á").replace("aa","á").replace("EE","É").replace("II","Í").replace("OO","Ó").replace("UU","Ú").replace("ee","é").replace("ii","í").replace("oo","ó").replace("uu","ú").replace("Rf", "rf"); 
121 
122    $('.evr-ntvs__txt')[0].innerText = noCapitalizeTile2; 
123 
124    function capitalizeFirstLetters(str){ 
125        const regex = /(^|\b(?!(the|for|to|a|e|i|o|u|á|é|í|ó|ú|ante|con|contra|de|del|desde|en|y|las|la|lo|los|el|entre|hacia|hasta|para|según|sin|so|sobre|tras|por)\b))\w+/g; 
126        return str.toLowerCase().replace(regex, s => s[0].toUpperCase() + s.slice(1)) 
127
128</script> 
129<style type="text/css"> 
130    .evr-wrapper { 
131        margin-left: 5%; 
132        margin-right: 5%; 
133
134    .evr-article-layout__paragraph{ 
135        text-align: justify; 
136
137    .evr-ntvs__txt{ 
138        font-weight: bold; 
139
140</style>