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