An error occurred while processing the template.
The following has evaluated to null or missing:
==> freeMarkerPortletPreferences.setValue  [in template "20099#20135#66961" at line 196, column 37]

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