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