Genelec Music Channel (EN) - Genelec - Français

Une erreur s'est produite lors du traitement du gabarit.
The following has evaluated to null or missing:
==> cmsEntity.getLocalizedField(profile, "/entity/fields/title")  [in template "20116#20152#893959" at line 55, column 81]

----
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: ${cmsEntity.getLocalizedField(profile...  [in template "20116#20152#893959" at line 55, column 79]
----
1<#-- 
2Widget templates can be used to modify the look of a 
3specific application. 
4 
5Please use the left panel to quickly add commonly used variables. 
6Autocomplete is also available and can be invoked by typing "${". 
7--> 
8 
9<#----------------------------------------------------------------------------- 
10    INIT 
11------------------------------------------------------------------------------> 
12<#assign assetPublisherInstanceId = themeDisplay.getPortletDisplay().getInstanceId()> 
13<#assign portletId = "p_p_id_" + themeDisplay.getPortletDisplay().getId() + "_"> 
14<#assign portletTitle = themeDisplay.getPortletDisplay().getTitle() > 
15<#assign useCustomTitle = themeDisplay.getPortletDisplay().getPortletSetup().getValue("portletSetupUseCustomTitle", "") > 
16 
17<#assign cmsContentService = serviceLocator.findService("com.ch5finland.genelec.cms.service.CMSContentService") > 
18<#assign cmsContentFormatterService = serviceLocator.findService("com.ch5finland.genelec.cms.service.CMSContentFormatterService") > 
19<#assign profileService = serviceLocator.findService("com.ch5finland.genelec.cms.service.ProfileService") > 
20<#assign profile = profileService.getProfile(request) > 
21 
22<#if useCustomTitle == "true"> 
23    <div class="row"> 
24        <div class="col-12 mb-4"> 
25            <h1 class="h1">${portletTitle}</h1> 
26        </div> 
27    </div> 
28</#if> 
29 
30<#if entries?has_content> 
31	<#list entries as curEntry> 
32        <#assign articleIdAsString = curEntry.getAssetRenderer().getArticle().getArticleId() > 
33        <#assign cmsEntity = cmsContentService.getEntityByArticleId(profile, articleIdAsString) > 
34         
35        <#assign id = cmsEntity.getField("/entity/id")> 
36        <#if cmsEntity.getField("/entity/fields/url")??> 
37            <#assign videoID = "" > 
38            <#assign videoURL = cmsEntity.getField("/entity/fields/url")> 
39            <#assign videoType = ""> <#-- Youtube or vimeo --> 
40             
41            <#if videoURL?contains("youtu.be")> 
42                <#assign videoID = videoURL?split("/")?last /> 
43                <#assign videoType = "youtube"> 
44            <#elseif videoURL?contains("youtube")> 
45                <#assign videoID = videoURL?replace("^.*\\?v=([\\w-_]*).*", "$1", "r") />  
46                <#assign videoType = "youtube"> 
47            <#elseif videoURL?contains("vimeo")> 
48                <#assign videoID = videoURL?split("/")?last />  
49                <#assign videoType = "vimeo"> 
50            </#if> 
51             
52            <div class="zoom-gallery-video">  
53                <div >             
54                    <div id="video-title-${id}"> 
55                        <h2 id="video-title-header-${id}" class="text-bolder">${cmsEntity.getLocalizedField(profile, "/entity/fields/title")}</h2> 
56                        <div data-slide-id="video-${id}"  
57                            class="zoom-gallery-slide-video video-slide responsive-wrapper active ${videoType}-pop"  
58                            role="button"  
59                            data-embed="${videoID}"  
60                            id="video-${id}" 
61                            aria-labelledby="video-title-header-${id}" 
62                            > 
63                            <span class="icon-play"></span> 
64                            <span class="round-button"></span> 
65                        </div> 
66                    </div> 
67                </div> 
68            </div> 
69        </#if> 
70	</#list> 
71</#if> 
72 
73<script> 
74 
75$('#${portletId} .vimeo-pop').on('click',function() { 
76	var id = $(this).data('embed'); 
77	var thumb = $(this).find("img"); // we assume thumb ratio is same as video's 
78	loadAndOpenVimeoVideo(id, thumb.width(), thumb.height()); 
79}); 
80 
81$(document).ready(function() { 
82	$( "#${portletId} .vimeo-pop" ).each(function(index){ 
83        var url = createVimeoUrl(this.dataset.embed); 
84		loadVimeoJson(url,this.dataset.embed,'thumbnail'); 
85	}); 
86}); 
87 
88$(document).ready(function() { 
89 
90	$( "#${portletId} .youtube-pop" ).each(function(index){ 
91         
92        if($(this).attr("data-embed") !== undefined){ 
93        var videoContainer = this; 
94		var source = "https://img.youtube.com/vi/"+ this.dataset.embed +"/maxresdefault.jpg"; 
95		 
96		 
97		var image = new Image(); 
98				image.src = source; 
99				image.className = "poster-image"; 
100				image.addEventListener( "load", function() { 
101					videoContainer.appendChild( image ); 
102				}( index ) ); 
103				videoContainer.addEventListener( "click", function() { 
104					var iframe = document.createElement( "iframe" ); 
105                    iframe.setAttribute( "frameborder", "0" ); 
106                    iframe.setAttribute( "allowfullscreen", "" ); 
107                    iframe.setAttribute( "allow", "autoplay" ); 
108                    iframe.setAttribute( "src", "https://www.youtube.com/embed/"+ videoContainer.dataset.embed +"?rel=0&autoplay=1" ); 
109                    iframe.setAttribute( "width", "100%" ); 
110                    iframe.setAttribute( "height", "100%" ); 
111                     
112                    var videoContainerSize = maxVideoSize(); 
113                    var videoSize = calcPreferredVideoSize( 
114                        videoContainerSize.width,  
115                        videoContainerSize.height, 
116                        image.width, 
117                        image.height 
118                    );                     
119                    openVideo(this, iframe.outerHTML, videoSize.width, videoSize.height); 
120 
121				} ); 
122        }; 
123	}); 
124	 
125}); 
126 
127$( window ).on( "load", function() { 
128    if (window.location.href.includes("?video=") && typeof genelec_videoPopupOpened == 'undefined') { 
129        genelec_videoPopupOpened = true; 
130        var urlParts = window.location.href.split("video="); 
131        if (urlParts.length > 1) { 
132            var videoId = 'video-' + urlParts[1]; 
133            $('#' + videoId).first().click() 
134        } 
135    } 
136}); 
137 
138 
139</script> 
Une erreur s'est produite lors du traitement du gabarit.
The following has evaluated to null or missing:
==> cmsEntity.getLocalizedField(profile, "/entity/fields/title")  [in template "20116#20152#893963" at line 69, column 76]

----
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: ${cmsEntity.getLocalizedField(profile...  [in template "20116#20152#893963" at line 69, column 74]
----
1<#include "${templatesPath}/227209" /> 
2 
3<#----------------------------------------------------------------------------- 
4    INIT 
5------------------------------------------------------------------------------> 
6<#assign assetPublisherInstanceId = themeDisplay.getPortletDisplay().getInstanceId()> 
7<#assign portletId = "p_p_id_" + themeDisplay.getPortletDisplay().getId() + "_"> 
8<#assign portletTitle = themeDisplay.getPortletDisplay().getTitle() > 
9<#assign useCustomTitle = themeDisplay.getPortletDisplay().getPortletSetup().getValue("portletSetupUseCustomTitle", "") > 
10 
11<#assign cmsContentService = serviceLocator.findService("com.ch5finland.genelec.cms.service.CMSContentService") > 
12<#assign cmsContentFormatterService = serviceLocator.findService("com.ch5finland.genelec.cms.service.CMSContentFormatterService") > 
13<#assign profileService = serviceLocator.findService("com.ch5finland.genelec.cms.service.ProfileService") > 
14<#assign profile = profileService.getProfile(request) > 
15 
16<#----------------------------------------------------------------------------- 
17    LOOP ENTRIES 
18------------------------------------------------------------------------------> 
19 
20<section class="latest-posts-container" > 
21 
22<#if useCustomTitle == "true"> 
23    <div class="row"> 
24        <div class="col-12 mb-4"> 
25            <h2 class="h2">${portletTitle}</h2> 
26        </div> 
27    </div> 
28</#if> 
29 
30        <div class="row flex-container flex-columns-3"> 
31 
32        <#if entries?has_content>  
33            <#list entries as curEntry>  
34 
35                <#assign articleIdAsString = curEntry.getAssetRenderer().getArticle().getArticleId() > 
36                <#assign cmsEntity = cmsContentService.getEntityByArticleId(profile, articleIdAsString) > 
37                 
38                <#assign id = cmsEntity.getField("/entity/id")> 
39                <#if cmsEntity.getField("/entity/fields/url")??> 
40                    <#assign videoID = "" > 
41                    <#assign videoURL = cmsEntity.getField("/entity/fields/url")> 
42                    <#assign videoType = ""> <#-- Youtube or vimeo --> 
43                     
44                    <#if videoURL?contains("youtu.be")> 
45                        <#assign videoID = videoURL?split("/")?last /> 
46                        <#assign videoType = "youtube"> 
47                    <#elseif videoURL?contains("youtube")> 
48                        <#assign videoID = videoURL?replace("^.*\\?v=([\\w-_]*).*", "$1", "r") />  
49                        <#assign videoType = "youtube"> 
50                    <#elseif videoURL?contains("vimeo")> 
51                        <#assign videoID = videoURL?split("/")?last />  
52                        <#assign videoType = "vimeo"> 
53                    </#if> 
54 
55 
56                    <div class="card card-img flex-item"> 
57                        <div class="aspect-ratio aspect-ratio-16-to-9 aspect-ratio-bg-cover"> 
58                            <div data-slide-id="video-${id}"  
59                                 class="btn zoom-gallery-slide-video video-slide responsive-wrapper active ${videoType}-pop"  
60                                 data-embed="${videoID}"  
61                                 id="video-${id}" 
62                                 aria-labelledby="video-title-header-${id}"> 
63                                <span class="icon-play"></span> 
64                                <span class="round-button"></span> 
65                            </div>                                 
66                        </div> 
67                        <div class="card-padding card-content"> 
68 
69                            <h3 id="video-title-header-${id}" class="h3">${cmsEntity.getLocalizedField(profile, "/entity/fields/title")}</h3> 
70 
71                        </div> 
72                    </div> 
73         
74                </#if> 
75            </#list>  
76        </#if> 
77 
78        </div> 
79 
80</section> 
81<script> 
82 
83 
84$('#${portletId} .vimeo-pop').on('click',function() { 
85	var id = $(this).data('embed'); 
86	var thumb = $(this).find("img"); // we assume thumb ratio is same as video's 
87	loadAndOpenVimeoVideo(id, thumb.width(), thumb.height()); 
88}); 
89 
90$(document).ready(function() { 
91	$( "#${portletId} .vimeo-pop" ).each(function(index){ 
92        var url = createVimeoUrl(this.dataset.embed); 
93		loadVimeoJson(url,this.dataset.embed,'thumbnail'); 
94	}); 
95}); 
96 
97$(document).ready(function() { 
98 
99	var youtube = document.querySelectorAll( ".youtube-pop" ); 
100 
101	$( "#${portletId} .youtube-pop" ).each(function(index){ 
102        if($(this).attr("data-embed") !== undefined){ 
103		var source = "https://img.youtube.com/vi/"+ this.dataset.embed +"/maxresdefault.jpg"; 
104		var videoContainer = this; 
105		 
106		var image = new Image(); 
107				image.src = source; 
108				image.className = "poster-image"; 
109				image.addEventListener( "load", function() { 
110					videoContainer.appendChild( image ); 
111				}( index ) ); 
112				videoContainer.addEventListener( "click", function() { 
113					var iframe = document.createElement( "iframe" ); 
114                    iframe.setAttribute( "frameborder", "0" ); 
115                    iframe.setAttribute( "allowfullscreen", "" ); 
116                    iframe.setAttribute( "allow", "autoplay" ); 
117                    iframe.setAttribute( "src", "https://www.youtube.com/embed/"+ videoContainer.dataset.embed +"?rel=0&autoplay=1" ); 
118                    iframe.setAttribute( "width", "100%" ); 
119                    iframe.setAttribute( "height", "100%" ); 
120                     
121                    var videoContainerSize = maxVideoSize(); 
122                    var videoSize = calcPreferredVideoSize( 
123                        videoContainerSize.width,  
124                        videoContainerSize.height, 
125                        image.width, 
126                        image.height 
127                    );                     
128                    openVideo(this, iframe.outerHTML, videoSize.width, videoSize.height); 
129 
130				} ); 
131        }; 
132	}); 
133 
134}); 
135 
136 
137$( window ).on( "load", function() { 
138    if (window.location.href.includes("?video=") && typeof genelec_videoPopupOpened == 'undefined') { 
139        genelec_videoPopupOpened = true; 
140        var urlParts = window.location.href.split("video="); 
141        if (urlParts.length > 1) { 
142            var videoId = 'video-' + urlParts[1]; 
143            $('#' + videoId).first().click() 
144        } 
145    } 
146}); 
147 
148 
149</script>