Er trad een fout op tijdens de verwerking van de template.
The following has evaluated to null or missing: ==> mlxDocumentsHelperService.getExpandoDocumentLocalizedValue("mlxDocumentTitle",videoFileEntry.getFileVersion().getFileVersionId(), locale, true) [in template "20101#20128#VIDEO-STR-DEFAULT-TEMPLATE" at line 50, 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 videoDescription = mlxDocumen... [in template "20101#20128#VIDEO-STR-DEFAULT-TEMPLATE" at line 50, column 13] ----
1<#assign productsStrKeys = ["PRODUCT-STR","PRODUCT-CATEGORY-STR", "SOFTWARE-SOLUTIONS-PRODUCTS-STR", "SOFTWARE-PRODUCT-STR"] />
2<#assign bannerContactMaster = "4013" />
3<#assign vidCategoryStrId = 415780 />
4<#assign videoStructureId = 415837/> <#--"video str" aqui el metodo recibe un long, por eso no podemos poner el structurekey -->
5<#assign vocabularyId = 388079 /> <#-- VideoCategories id mlxConstants.getLongConstant('???','?????') -->
6<#assign article = mlxAssetHelperService.fetchLatestApprovedArticle(groupId, .vars["reserved-article-id"].getData()) />
7<#assign articleId = article.getArticleId() />
8<#assign cdn = (mlxUrlUtilService.getCdn(groupId))!"" />
9
10<#--HEADER-->
11<div class="corporate--video--header--container">
12 <div class="corporate--video--header">
13 <h1 class="corporate--video--header--heading">${name.getData()}</h1>
14
15 <#if description?has_content>
16 <p class="corporate--video--header--subheading">${description.getData()}</p>
17 </#if>
18 </div>
19</div>
20
21
22<#--FILTERS-->
23<#assign videoCategoriesOrdered = mlxAssetHelperService.getJournalArticleListByStructureIdIdSortedByStructureFieldName(groupId, themeDisplay.getUserId(), vidCategoryStrId, "order", locale)>
24<div class="corporate--video--filters--container">
25 <ul class="corporate--video--filters">
26 <#list videoCategoriesOrdered as category>
27 <#if category?counter == 1>
28 <#assign categoryName><@corporate.mlxlanguage key='mlx.videocat.warehouse-videos' /></#assign>
29 <#else>
30 <#assign categoryName = mlxJournalHelperService.getStructureFieldValue(category, "name", locale)?string />
31 </#if>
32 <#assign categoryUrl = mlxUrlUtilService.getUrlByJournalArticle(category, locale, groupId)?string />
33 <li class="corporate--video--filters--item">
34 <a href="${categoryUrl}" title="${categoryName}" class="corporate--video--filters--item--link">${categoryName}</a>
35 </li>
36 </#list>
37 </ul>
38</div>
39
40
41<div class="corporate--video--container">
42
43 <#--VIDEO PLAYER-->
44 <div class="corporate--video--video-player--container">
45 <div class="corporate--video--video-player">
46 <#assign globalGroupId = mlxConstants.getLongConstant("GroupIds","GLOBAL")/>
47 <#assign videoUuid = mlxUrlUtilService.getUuidFromLiferayUrl(video.getData()) />
48 <#assign videoFileEntry = mlxDLFileEntryHelperService.getDLFileEntry(videoUuid, globalGroupId) />
49 <#assign youtubeEmbeddedCode = mlxDocumentsHelperService.getExpandoDocumentLocalizedValue("Mlxyoutubeembeddedcode",videoFileEntry.getFileVersion().getFileVersionId(), locale, true)/>
50 <#assign videoDescription = mlxDocumentsHelperService.getExpandoDocumentLocalizedValue("mlxDocumentTitle",videoFileEntry.getFileVersion().getFileVersionId(), locale, true)/>
51 <#assign videoDuration = mlxExpandoService.getExpandoValueForClass("com.liferay.document.library.kernel.model.DLFileEntry", "Mlxduration", videoFileEntry.getFileVersion().getFileVersionId())!"" />
52 <#assign videoUrl = mlxDocumentsHelperService.getDocumentUrlFromUUID(videoUuid, locale)!"" />
53
54 <#if (mlxDLFileEntryHelperService.getDLFileEntryMlxFieldValuePersisted("background", videoFileEntry.getFileEntryId())??)>
55 <#assign videoBackground = (mlxDLFileEntryHelperService.getDLFileEntryMlxFieldValuePersisted("background", videoFileEntry.getFileEntryId()))?replace('\\u','')?eval!{} />
56 <#else>
57 <#assign videoBackground = {} />
58 </#if>
59
60 <#if videoBackground.uuid??>
61 <#assign videoBackgroundfileEntry = mlxDLFileEntryHelperService.getDLFileEntry(videoBackground.uuid, globalGroupId) />
62 <#assign videoBackground = mlxUrlUtilService.getLRUrl(videoBackgroundfileEntry) />
63 <#else>
64 <#assign videoBackground = "" />
65 </#if>
66
67 <#if youtubeEmbeddedCode?has_content>
68 <figure class="corporate--video--video-player--figure-youtube">
69 <iframe class="corporate--video--video-player--youtube" width="100%" height="100%" src="https://www.youtube.com/embed/${youtubeEmbeddedCode}?rel=0" frameborder="0" allowfullscreen></iframe>
70 </figure>
71 <#else>
72 <figure class="corporate--video--video-player--figure">
73 <video class="corporate--video--video-player--vid" poster="${videoBackground}" controls="controls" controlsList="nodownload">
74 <source src="${videoUrl}" >
75 </video>
76 <#if videoDescription?has_content>
77 <figcaption class="corporate--video--video-player--figcaption">
78 <h3 class="corporate--video--video-player--figcaption-title">${videoDescription}</h3>
79 </figcaption>
80 </#if>
81 </figure>
82 </#if>
83 </div>
84
85 <!-- DATOS ESTRUCTURADOS SEO JSON+LD -->
86 <#assign domain = themeDisplay.getPortalDomain() />
87 <#assign organizationName = "Mecalux">
88 <#assign publicDate = dateUtil.getDate(article.displayDate, "dd/MM/yyyy", locale, timeZoneUtil.getTimeZone("UTC")) />
89 <#assign publicDateIso = dateUtil.getDate(article.displayDate, "yyyy-MM-dd'T'HH:mm:ssZ", locale, timeZoneUtil.getTimeZone("UTC")) />
90 <#assign cdn = mlxUrlUtilService.getCdn(groupId)!""/> <!-- Añado CDN, en principio no debería hacer falta, si viene videoURL por duplicado se retira de aqui y las llamadas -->
91
92 <#-- logo -->
93 <#assign logo="/documents/20128/3456912/Mecalux-logo_600x60px.jpg/04c628fa-bb4c-0e81-75c9-2e598563979d?t=1582118551000" />
94 <#if (domain?contains("es")) || (domain?contains("mecalux.es")) >
95 <#assign logo="/documents/20128/3456912/MecaluxEsmena-logo_600x60px.jpg/55173d2f-aadd-3f09-d3fb-456a758b3bd6?t=1582118551000" />
96 </#if>
97 <#if (domain?contains("us")) || (domain?contains("interlake")) >
98 <#assign logo="/documents/20128/3456912/InterlakeMecalux-logo_600x60px.jpg/48f97d72-4230-e18c-9424-b06fae217c90?t=1582118551000">
99 </#if>
100
101 <!-- DATOS ESTRUCTURADOS SEO JSON+LD -->
102 <#assign domain = themeDisplay.getPortalDomain() />
103 <#assign organizationName = "Mecalux">
104 <#assign publicDate = dateUtil.getDate(article.displayDate, "dd/MM/yyyy", locale, timeZoneUtil.getTimeZone("UTC")) />
105 <#assign cdn = mlxUrlUtilService.getCdn(groupId)!""/> <!-- Añado CDN, en principio no debería hacer falta, si viene videoURL por duplicado se retira de aqui y las llamadas -->
106
107 <#-- logo -->
108 <#assign logo="/documents/20128/3456912/Mecalux-logo_600x60px.jpg/04c628fa-bb4c-0e81-75c9-2e598563979d?t=1582118551000" />
109 <#if (domain?contains("es")) || (domain?contains("mecalux.es")) >
110 <#assign logo="/documents/20128/3456912/MecaluxEsmena-logo_600x60px.jpg/55173d2f-aadd-3f09-d3fb-456a758b3bd6?t=1582118551000" />
111 </#if>
112 <#if (domain?contains("us")) || (domain?contains("interlake")) >
113 <#assign logo="/documents/20128/3456912/InterlakeMecalux-logo_600x60px.jpg/48f97d72-4230-e18c-9424-b06fae217c90?t=1582118551000">
114 </#if>
115
116 <script type="application/ld+json">
117 {
118 "@context": "https://schema.org",
119 "@type": "VideoObject",
120 "name": "${name.getData()?replace("\"","\\\"")?replace("“","\\\"")}",
121 "description": "${description.getData()?replace("\"","\\\"")?replace("“","\\\"")}",
122 "thumbnailUrl": "${videoBackground!}",
123 "uploadDate": "${publicDateIso}",
124 <#if videoDuration?has_content>
125 "duration": "${videoDuration.getData()}",
126 </#if>
127 "publisher": {
128 "@type": "Organization",
129 "name": "${organizationName}",
130 "logo": {
131 "@type": "ImageObject",
132 "url": "${logo}",
133 "width": 600,
134 "height": 60
135 }
136 },
137 "contentUrl": "${cdn}${videoUrl}",
138 "embedUrl": "${cdn}${videoUrl}"
139 }
140
141 </script>
142
143 </div>
144
145 <#--RELATED PRODUCTS-->
146 <#assign productRelated = mlxAssetHelperService.getRelatedArticlesByStructure(groupId, articleId, productsStrKeys)!"{}" />
147
148 <#if productRelated?has_content>
149
150 <div class="corporate--video--related-prods--container">
151 <h3 class="corporate--video--related-prods--title">${languageUtil.get(locale,"mlx.video.related.products")}</h3>
152 <div class="corporate--video--related-prods">
153
154 <#list productRelated as product>
155 <#assign productValues = mlxJournalHelperService.getStructureFieldValues(product, locale) />
156
157 <#if product.getDDMStructure().getStructureKey() == "SOFTWARE-PRODUCT-STR" >
158 <#assign productImageContent = productValues["detail_imageFieldSet"].detail_image!"{}" />
159 <#else>
160 <#assign productImageContent = (productValues.list_imageFieldSet["list_image"]?eval)!"{}" />
161 </#if>
162
163 <#assign productName = (productValues["name"]?string)!"" />
164 <#assign productUrl = mlxUrlUtilService.getUrlByJournalArticle(product,locale, groupId)?string />
165 <#assign productMasterName = mlxMastersHelperService.getMasterNameByJournalArticle(product) />
166 <#if !(productName?ends_with("*"))>
167 <article class="corporate--video--related-prods--item">
168 <#if productImageContent?has_content>
169 <#assign productImage = productImageContent />
170 </#if>
171 <#if productImage?has_content>
172 <#assign fileEntry = mlxDLFileEntryHelperService.getDLFileEntry(productImage.uuid, globalGroupId)!"{}" />
173 <#assign productImageUrl = mlxUrlUtilService.getLRUrl(fileEntry) />
174 <figure class="corporate--video--related-prods--item--figure">
175 ${corporate.img(productImageUrl, true, 'alt="' + productName + '"', 'title="' + productName + '"', 'class="corporate--video--related-prods--item--image"')}
176 </figure>
177 </#if>
178 <h2 class="corporate--video--related-prods--item--link-wrapper">
179 <a href="${productUrl}" title="${productName}" class="corporate--video--related-prods--item--link" data-content-master="${product.getDDMStructure().getStructureKey()}" data-content-structure="${productMasterName}">${productName}</a>
180 </h2>
181 </article>
182 </#if>
183 </#list>
184
185 </div>
186 </div>
187
188 </#if>
189
190
191 <#-- TRANSCRIPTION
192
193
194 <#if video_transcription.getData()?has_content>
195 <section class="corporate--section">
196 <h2 class="mecalux--content--title"><@corporate.mlxlanguage key="mlx.video.transcription" /></h2>
197 <div class="mecalux--content--transcripcion">
198 ${video_transcription.getData()}
199 </div>
200 </section>
201 </#if>
202
203 -->
204
205 <#--BANNER CONTACTO -->
206
207 <#assign bannerContacto = (mlxMastersHelperService.getJournalArticleByMasterAndGroup(bannerContactMaster?number, scopeGroupId))!"">
208 <#if bannerContacto!="">
209 <#assign content = mlxJournalContentService.getContent(bannerContacto, bannerContacto.getDDMTemplateKey(),"${locale}",themeDisplay,'view') />
210 <#if content?has_content>
211 ${content}
212 </#if>
213 </#if>
214
215
216 <#--RELATED VIDEOS-->
217 <#assign vidCatEntry = mlxAssetHelperService.getAssetEntryByJournalArticle(article)!"{}" />
218 <#assign category = mlxAssetHelperService.getAssetCategoryByAssetEntryAndVocabularyId(vidCatEntry, vocabularyId)!"{}" />
219
220 <#if category != "{}">
221 <#assign categoryId = category.categoryId />
222
223 <#--!!FALTA PODER ORDENAR ESTAS LISTAS por "fecha de creación"!! => idem que en 6.2 (se usaba el portlet de busqueda) -->
224 <#assign videosRelated = mlxAssetHelperService.getJournalArticleListByStructureIdAndCategoryId(groupId, themeDisplay.getUserId(), videoStructureId, categoryId) />
225
226 <#if (videosRelated?has_content) && (videosRelated?size > 1)>
227
228 <div class="corporate--video--related-vids--container">
229 <h3 class="corporate--video--related-vids--title"><@corporate.mlxlanguage key="mlx.video.related.videos" /></h3>
230 <div class="corporate--video--related-vids">
231 <#assign videosRelatedIndex = 0 />
232 <#list videosRelated as relatedVideo>
233 <#if (videosRelatedIndex < 3) && (relatedVideo.getArticleId() != articleId)>
234 <#assign videoValues = mlxJournalHelperService.getStructureFieldValues(relatedVideo, locale) />
235 <#assign videoName = (videoValues["name"]?string)!"" />
236 <#assign videoUrl = mlxUrlUtilService.getUrlByJournalArticle(relatedVideo,locale, groupId)?string />
237 <#assign videoUuid = (videoValues["video"])!"{}" />
238 <#if videoUuid?has_content>
239 <#assign videoUuid = videoUuid.uuid />
240 </#if>
241 <#assign videoFileEntry = mlxDLFileEntryHelperService.getDLFileEntry(videoUuid, globalGroupId) />
242 <article class="corporate--video--related-vids--item" >
243
244 ${corporate.img(cdn + '/o/corporate-theme/images/common/th-play2.png', false, 'alt="' + videoName + '"', 'title="' + videoName + '"', 'class="corporate--video--related-vids--item--icon"')}
245 <#assign videobackground = (mlxDLFileEntryHelperService.getDLFileEntryMlxFieldValuePersisted("background", videoFileEntry.getFileEntryId()))!"" />
246 <#if videobackground?has_content>
247 <#assign videobackground = videobackground?replace('\\u','')?eval />
248 <#assign videobackgroundfileEntry = mlxDLFileEntryHelperService.getDLFileEntry(videobackground.uuid, globalGroupId) />
249 <#assign videobackground = mlxUrlUtilService.getLRUrl(videobackgroundfileEntry) />
250 <figure class="corporate--video--related-vids--item--figure">
251 ${corporate.img(videobackground, true, 'alt="' + videoName + '"', 'title="' + videoName + '"', 'class="corporate--video--related-vids--item--image"')}
252 </figure>
253 </#if>
254 <div class="corporate--video--related-vids--item--content">
255 <a href="${videoUrl}" title="${videoName}" class="corporate--video--related-vids--item--link">${videoName}</a>
256 </div>
257 </article>
258 <#assign videosRelatedIndex = videosRelatedIndex + 1 />
259 </#if>
260 </#list>
261 </div>
262 </div>
263 </#if>
264 </#if>
265
266</div>
267
268
269
270<script> /*MKTG-848 Obtener portletInstance y reemplazar button href con marcacion gtm porque el portlet namespace difiere de paginas de producto */
271window.addEventListener('load', function(){
272 var portletNameSpace = Liferay.Portlet.list.find(pn => pn.includes('contact'));
273 mecalux.cache.$body.find('.corporate--quote-info--item-link').attr('href','?p_p_id='+portletNameSpace+'&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&cta_origin=CTA_Footer');
274 mecalux.cache.$body.find('.corporate--sticky-header--cta').attr('href','?p_p_id='+portletNameSpace+'&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&cta_origin=CTA_Sticky');
275});
276</script>