Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> categoryIds  [in template "20099#20135#190553" at line 220, column 41]

----
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 preferences = {"queryName0": ...  [in template "20099#20135#190553" at line 216, column 21]
----
1<#-- publicacion_detalle_editado --> 
2 
3<style> 
4    span.post-date { 
5        padding: 5px 15px 5px 15px; 
6        background-color: #f2f2f2; 
7        position: absolute; 
8        margin-top: -50px; 
9        font-size: .85rem; 
10
11 
12    div.autor{ 
13        margin-bottom:40px; 
14
15     
16     .post.detail h1{ 
17    	font-size: 2em; 
18
19     
20    .post.detail .related-content .img-cont { 
21        max-width: 100%!important; 
22        max-height: 100%!important; 
23
24 
25</style> 
26 
27<#setting locale = themeDisplay.getLanguageId() /> 
28 
29<#-- Servicios Liferay --> 
30<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")> 
31<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
32<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService")> 
33<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService")> 
34<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")> 
35<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
36<#assign assetCategoryPropertyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService")> 
37<#assign journalArticleExtLocalService = serviceLocator.findService("com.izertis.internet.journal.ext.service.service.JournalArticleExtLocalService")> 
38<#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")> 
39 
40<#assign journalArticle = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
41<#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()) /> 
42<#assign relatedAssets = assetLinkLocalService.getDirectLinks(assetEntry.getEntryId())/> 
43<#assign journalArticleClassNameId = classNameLocalService.getClassNameId("com.liferay.journal.model.JournalArticle")/> 
44<#assign categoryList = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle",journalArticle.getResourcePrimKey()) > 
45 
46<#-- Configuración hardcoded de pre--> 
47 
48<#-- template recurso banner: templateKey de la tabla ddmtemplate --> 
49<#assign resourceTemplateKey = "192103"> 
50<#-- adt publicaciones relacionadas: templateKey de la tabla ddmtemplate --> 
51<#assign relatedPublicationsADTKey ="ddmTemplate_190899"> 
52<#-- estructura publicacion: structureId de la tabla ddmstructure --> 
53<#assign relatedPublicationsClassTypeIds ="75866"> 
54<#-- delta para paginacion --> 
55<#assign relatedPublicationsDelta = "5"> 
56 
57<div class="post detail"> 
58    <div class="row"> 
59        <#-- Imagen fondo --> 
60        <#if (image.getData()?? && image.getData() != "")> 
61            <#assign backgroundImageURL = image.getData()> 
62        <#else> 
63            <#assign backgroundImageURL = "/o/portal-izertis-theme/images/publications/" + journalArticle.getArticleId()[journalArticle.getArticleId()?length-1] + ".jpg"> 
64        </#if> 
65 
66        <#-- Imagen que se usara en los meta tags --> 
67        <#if (socialNetworksImage?? && socialNetworksImage.getData()?? && socialNetworksImage.getData() != "")> 
68            <#assign headerTagsImage = socialNetworksImage.getData()> 
69        <#elseif (miniatureimage?? && miniatureimage.getData()?? && miniatureimage.getData() != "")> 
70            <#assign headerTagsImage = miniatureimage.getData()> 
71        <#else> 
72            <#assign headerTagsImage = "/o/portal-izertis-theme/images/publications/" + journalArticle.getArticleId()[journalArticle.getArticleId()?length-1] + "_miniature.jpg"> 
73        </#if> 
74 
75        <div class="col-xl-6 d-none d-xl-block px-0"> 
76            <div class="img-cont-fixed" style="background-image:url(${backgroundImageURL})"> 
77                <#-- sr-only: screen reader only --> 
78                <#if (image.getAttribute("alt")?? && image.getAttribute("alt") != "")> 
79                <img class="sr-only" src="${backgroundImageURL}" alt="${image.getAttribute("alt")}"> 
80                </#if> 
81            </div> 
82        </div> 
83 
84        <div class="col-xl-6 col-xl-6 pt-5 pt-xl-0"> 
85            <div class="row"> 
86                <div class="col-xxl-11 px-5 pl-xxl-100px pl-xl-5 pt-xxl-10 pt-xl-5"> 
87                    <div class="row align-items-center autor"> 
88                        <#-- Autor: contenido relacionado con estructura autor --> 
89                        <#assign author = 0 /> 
90                        <#list relatedAssets as relatedAssetLink> 
91                            <#assign relatedAsset = assetEntryLocalService.getAssetEntry(relatedAssetLink.getEntryId2()) /> 
92                            <#if journalArticleClassNameId == relatedAsset.getClassNameId()> 
93                                <#assign relatedJournalArticle = journalArticleLocalService.getLatestArticle(relatedAsset.getClassPK()) /> 
94                                <#assign relatedJournalArticleStructure = ddmStructureLocalService.getStructure(groupId, journalArticleClassNameId, relatedJournalArticle.getDDMStructureKey()) /> 
95                                <#if relatedJournalArticleStructure.getName("es_ES") == "Autor"> 
96                                    <#assign author = relatedJournalArticle /> 
97                                    <#assign document = saxReaderUtil.read(author.getContent())> 
98                                    <#assign rootElement = document.getRootElement()> 
99                                    <#assign defaultLanguageId = parseXml ("@default-locale", rootElement)> 
100                                    <#attempt> 
101                                        <#assign xpathSelector = saxReaderUtil.createXPath("dynamic-element[@name='profileImage']")> 
102                                        <#assign profileImage = xpathSelector.selectSingleNode(rootElement).getStringValue()> 
103                                        <#assign imgJson = jsonFactoryUtil.createJSONObject(profileImage)> 
104                                        <#assign urlProfileImage = "/documents/" + imgJson.groupId + "/" + imgJson.uuid > 
105                                    <#recover> 
106                                        <#assign urlProfileImage = "/o/portal-izertis-theme/images/sin-foto.jpg"> 
107                                    </#attempt> 
108                                    <#assign authorName = getField("name", locale, defaultLanguageId, rootElement)!> 
109                                    <#if authorName?matches("izertis", "i")> 
110                                        <#assign authorName = ""> 
111                                    </#if> 
112                                    <#assign position = getField("position", locale, defaultLanguageId, rootElement)!> 
113                                </#if> 
114                            </#if> 
115                        </#list> 
116                        <#if !author?is_number> 
117                        <div class="col-md-12 mb-5"> 
118                            <div class="author-info"> 
119                                <span class="author-image d-inline-block pr-2"> 
120                                    <img src="${urlProfileImage}"> 
121                                </span> 
122                                <#if (authorName?? && authorName != "") || (position?? && position != "")> 
123                                <div class="author-name d-inline-block align-middle"> 
124                                    <#if authorName?? && authorName != ""><span class="name">${authorName}</span></#if> 
125                                    <#if position?? && position != ""><span class="workposition">${position}</span></#if> 
126                                </div> 
127                                </#if> 
128                            </div> 
129                        </div> 
130                        </#if> 
131 
132                    </div> 
133                     
134                    <div class="row"> 
135                        <#-- Contenido --> 
136                        <div class="col-12 pb-4 pr-0 pl-0 pl-xxl-3 pl-xl-3 pr-xxl-3 pr-xl-3"> 
137                            <#if content?? && content.getData()!=""> 
138                                <div class="detail-cont"> 
139 
140                                <span class="post-date"> <@liferay.language_format arguments="<strong> ${journalArticle.getDisplayDate()?date?string[languageUtil.get(themeDisplay.getLocale(), 'journal.article.date.format')]} </strong>" key="posted-on-x" />  </span> 
141 
142                                    <#if title?? && title.getData()!=""> 
143                                    <h1>${title.getData()}</h1> 
144                                    </#if> 
145                                    ${content.getData()} 
146                                </div> 
147                            </#if> 
148                        </div> 
149 
150                        <#-- Categorías bottom --> 
151                        <div class="col-12"> 
152                            <#if categoryList?has_content> 
153                                <div class="category"> 
154                                    <#list categoryList as category> 
155                                        <#--  
156                                        <#assign vocabulary = assetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId()) /> 
157                                        <#if vocabulary.getTitle("ES_es") == "Tipo de contenido"> 
158                                            <#assign publicationsUrl = "/publications/-/categories/" + category.getCategoryId() + "?p_r_p_resetCur=true&p_r_p_categoryId=" + category.getCategoryId() + "#post-list" /> 
159                                            <a data-senna-off="true" class="badge badge-category" href="${publicationsUrl}">${category.getTitle(themeDisplay.getLocale())}</a> 
160                                        <#else> 
161                                            <span class="badge badge-category">${category.getTitle(themeDisplay.getLocale())}</span> 
162                                        </#if> 
163                                        --> 
164                                        <#assign publicationsUrl = "/publications/-/categories/" + category.getCategoryId() + "?p_r_p_resetCur=true&p_r_p_categoryId=" + category.getCategoryId() + "#post-list" /> 
165                                        <a data-senna-off="true" class="badge badge-category" href="${publicationsUrl}">${category.getTitle(themeDisplay.getLocale())}</a> 
166                                    </#list> 
167                                </div> 
168                            </#if> 
169                        </div> 
170 
171                        <#-- Redes sociales --> 
172                        <div class="col-12 pt-3 pb-xxl-8 pb-5 text-center text-md-right"> 
173                            <div class="share"> 
174                                <span class="title d-block d-md-inline"><@liferay.language key="journal.article.share" /></span> 
175                                <span><a href="${journalArticleExtLocalService.getTwitterShareUrl(journalArticle, themeDisplay)}"><i class="icon-twitter"></i></a></span>  
176                                <span><a href="${journalArticleExtLocalService.getFacebookShareUrl(journalArticle, themeDisplay)}"><i class="icon-facebook"></i></a></span>  
177                                <span><a href="${journalArticleExtLocalService.getLinkedinShareUrl(journalArticle, themeDisplay)}"><i class="icon-linkedin"></i></a></span> 
178                            </div> 
179                        </div> 
180 
181                        <div class="col-12"> 
182                            <p><a class="back" href="javascript:history.back()">&lt;&nbsp;<@liferay.language key="back-link" /></a></p> 
183                        </div> 
184                    </div> 
185 
186                     
187                </div> 
188 
189                <div class="col-12"> 
190                    <#-- Whitepaper contenido relacionado con estructura recurso --> 
191                    <#assign resource = 0 /> 
192                    <#list relatedAssets as relatedAssetLink> 
193                        <#assign relatedAsset = assetEntryLocalService.getAssetEntry(relatedAssetLink.getEntryId2()) /> 
194                        <#if journalArticleClassNameId == relatedAsset.getClassNameId()> 
195                            <#assign relatedJournalArticle = journalArticleLocalService.getLatestArticle(relatedAsset.getClassPK()) /> 
196                            <#assign relatedJournalArticleStructure = ddmStructureLocalService.getStructure(groupId, journalArticleClassNameId, relatedJournalArticle.getDDMStructureKey()) /> 
197                            <#if relatedJournalArticleStructure.getName("es_ES") == "Recurso"> 
198                                <#assign resource = relatedJournalArticle /> 
199                            </#if> 
200                        </#if> 
201                    </#list> 
202                    <#if !resource?is_number> 
203                        <div class="row download"> 
204                            ${journalArticleLocalService.getArticleContent(resource, resourceTemplateKey, "VIEW", locale, themeDisplay)} 
205                        </div> 
206                    </#if> 
207 
208                    <#-- Contenidos relacionados: publicador que muestra los ultimos contenidos que tienen las mismas categorías --> 
209                    <#if categoryList?has_content> 
210                        <#assign categoryIds = [] /> 
211                        <#list categoryList as category> 
212                            <#assign categoryIds = categoryIds + [category.getCategoryId()?string] /> 
213                        </#list> 
214                    </#if> 
215 
216                    <#assign preferences = { 
217                        "queryName0": "assetCategories", 
218                        "queryContains0": "true", 
219                        "queryAndOperator0": "false", 
220                        "queryValues0": categoryIds, 
221                        "orderByColumn1": "publishDate", 
222                        "orderByType1": "DESC", 
223                        "emailAssetEntryAddedEnabled": "false", 
224                        "displayStyle": relatedPublicationsADTKey, 
225                        "classTypeIds": relatedPublicationsClassTypeIds, 
226                        "delta": relatedPublicationsDelta 
227                    }/> 
228                     
229                    <@liferay_portlet["runtime"] 
230                        defaultPreferences="${freeMarkerPortletPreferences.getPreferences(preferences)}" 
231                        portletProviderAction=portletProviderAction.VIEW 
232                        instanceId="related_to_articleid_${journalArticle.getArticleId()?string}" 
233                        persistSettings=false 
234                        portletName="com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet" /> 
235                         
236                    <#assign preferences = {} /> 
237                </div> 
238            </div> 
239        </div> 
240    </div> 
241</div> 
242 
243<@liferay_util["html-top"]> 
244    <#if locale=="pt_PT" || themeDisplay.getURLCurrent()?contains("/pt/-/")> 
245        <#assign virtualExpireDate = ("20210101")?date("yyyyMMdd") /> 
246        <#assign displayDate = journalArticle.getDisplayDate()?date /> 
247        <#if displayDate lte virtualExpireDate> 
248        <meta name="robots" content="noindex,nofollow"> 
249        </#if> 
250    </#if> 
251    <#if metatags??> 
252    ${metatags.getData()} 
253    </#if> 
254    <!--<link data-senna-track="temporary" href="${journalArticleExtLocalService.getFriendlyUrlAbsolute(journalArticle, locale, themeDisplay)}" rel="canonical" />--> 
255    <link data-senna-track="temporary" href="${journalArticleExtLocalService.getFriendlyUrlAbsolute(journalArticle, localeUtil.fromLanguageId("es_ES"), themeDisplay)}" hreflang="x-default" rel="alternate" /> 
256    <link data-senna-track="temporary" href="${journalArticleExtLocalService.getFriendlyUrlAbsolute(journalArticle, localeUtil.fromLanguageId("es_ES"), themeDisplay)}" hreflang="es" rel="alternate" /> 
257    <#if journalArticle.getFriendlyURLMap()?keys?seq_contains("en_US")> 
258        <link data-senna-track="temporary" href="${journalArticleExtLocalService.getFriendlyUrlAbsolute(journalArticle, localeUtil.fromLanguageId("en_US"), themeDisplay)}" hreflang="en" rel="alternate" /> 
259    </#if> 
260    <#if journalArticle.getFriendlyURLMap()?keys?seq_contains("pt_PT")> 
261        <link data-senna-track="temporary" href="${journalArticleExtLocalService.getFriendlyUrlAbsolute(journalArticle, localeUtil.fromLanguageId("pt_PT"), themeDisplay)}" hreflang="pt" rel="alternate" /> 
262    </#if> 
263     
264    <#assign description = htmlUtil.extractText(journalArticle.getDescription(locale)) /> 
265    <meta property="og:type" content="article"> 
266    <meta property="og:description" content="${description}"> 
267    <#if title?? && title.getData()!=""> 
268        <meta property="og:title" content="${htmlUtil.escape(title.getData())}"> 
269    </#if> 
270    <meta property="og:image" content="${themeDisplay.getURLPortal()}${headerTagsImage}"> 
271    <meta property="og:url" content="${themeDisplay.getURLPortal()}${themeDisplay.getURLCurrent()}"> 
272    <#if !author?is_number && authorName?? && authorName != ""> 
273    <meta property="article:author" content="${authorName}"> 
274    </#if> 
275 
276    <meta name="twitter:card" content="summary_large_image"> 
277    <meta name="twitter:description" content="${description}"> 
278    <#if title?? && title.getData()!=""> 
279        <meta name="twitter:title" content="${htmlUtil.escape(title.getData())}"> 
280    </#if> 
281    <meta name="twitter:image" content="${themeDisplay.getURLPortal()}${headerTagsImage}"> 
282    <script id="schemeArticle" type="application/ld+json"> 
283
284    "@context": "http://schema.org", 
285    "@type": "Article", 
286    "mainEntityOfPage": { 
287        "@type": "WebPage", 
288        "@id": " https://www.izertis.com" 
289    }, 
290    <#if (authorName?? && authorName != "")> 
291    "author": { 
292        "@type": "Person", 
293        "name": "${authorName}" 
294    }, 
295    <#else> 
296    "author": { 
297        "@type": "Organization", 
298        "name": "Izertis" 
299    }, 
300    </#if> 
301    "name": "${htmlUtil.escape(title.getData())}", 
302 
303    <#assign displaydate = .vars['reserved-article-display-date'].data> 
304    <#assign modifieddate = .vars['reserved-article-modified-date'].data> 
305    <#assign originalLocale = .locale> 
306    <#setting locale = localeUtil.getDefault()> 
307    <#assign displaydate = displaydate?date("EEE, d MMM yyyy HH:mm:ss Z")> 
308    <#assign modifieddate = modifieddate?datetime("EEE, d MMM yyyy HH:mm:ss Z")> 
309    <#assign locale = originalLocale> 
310    "datepublished": "${displaydate?iso_utc}", 
311    "datemodified": "${modifieddate?iso_utc}", 
312    "headline": "${htmlUtil.escape(title.getData())}", 
313    "image": "${headerTagsImage}", 
314    "publisher": { 
315        "@type": "Organization", 
316        "name": "Izertis", 
317        "logo": { 
318        "@type": "ImageObject", 
319        "url": "https://www.izertis.com/image/layout_set_logo?img_id=234136&t=1562565981703" 
320
321
322
323    </script> 
324</@> 
325 
326<#function getField field languageId defaultLanguageId xml> 
327    <#local defaultSelector = "//dynamic-content[@language-id='" + defaultLanguageId + "' and ancestor-or-self::*[@name='" + field + "']]"> 
328    <#local localeSelector = "//dynamic-content[@language-id='" + languageId + "' and parent::*[@name='" + field + "']]"> 
329 
330    <#local selector = saxReaderUtil.createXPath(localeSelector)> 
331    <#local value = selector.selectSingleNode(xml)!> 
332 
333    <#if value?has_content> 
334        <#return value.getText()> 
335    </#if> 
336 
337    <#local selector = saxReaderUtil.createXPath(defaultSelector)> 
338    <#local value = selector.selectSingleNode(xml)!> 
339 
340    <#if value?has_content> 
341        <#return value.getText()> 
342    </#if> 
343 
344    <#return ""> 
345</#function> 
346 
347<#function parseXml xpath xml> 
348    <#local selector = saxReaderUtil.createXPath(xpath)> 
349    <#local result = selector.selectSingleNode(xml)!> 
350 
351    <#if result?has_content> 
352        <#return result.getStringValue()> 
353    </#if> 
354 
355    <#return ""> 
356</#function> 
357 
358<#function getBackgrondImage journalArticle image> 
359 
360    <#if image.getData()?? && image.getData() != ""> 
361        <#return image.getData()> 
362    <#else> 
363        <#assign imageNumber = journalArticle.getArticleId()[journalArticle.getArticleId()?length-1]?left_pad(2, "0")/> 
364        <#return "/o/portal-izertis-theme/images/publications/" + imageNumber + ".jpg"> 
365    </#if> 
366</#function>