Extended Viewer

An error occurred while processing the template.
The following has evaluated to null or missing:
==> themeDisplay.portal  [in template "10159#10199#337678" at line 333, column 31]

----
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 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: ${themeDisplay.portal - url}  [in template "10159#10199#337678" at line 333, column 29]
----
1<script type="text/javascript" src="/o/msci/js/jwp7/jwplayer.js"></script> 
2<script type="text/javascript">jwplayer.key="GbgkIjQBQ45yte3KN3t0gD08bTAtwJd/yKg8UJpSzPk=";</script> 
3 
4 
5<#assign user_Id = getterUtil.getLong(themeDisplay["user-id"]) > 
6<#assign articleTool = journalArticleTool > 
7<#assign articleHelper = articleTool.getArticleHelper(.vars['reserved-article-id'].data) > 
8<#assign assetHelper = articleHelper.createAssetHelper() > 
9<#assign  last_modified_date_obj = dateUtil.parseDate("EEE, dd MMM yyyy hh:mm:ss Z", .vars['reserved-article-modified-date'].data, localeUtil.getSiteDefault()) > 
10<#assign last_modified_date = dateUtil.getDate(last_modified_date_obj, "dd MMM yyyy z", locale) > 
11 
12<#-- NON EXISTING METHOD - DEPRECATED TEMPLATE --> 
13<#-- assign preview = articleTool.getPreviewParameters(getterUtil.getLong(groupId), .vars['reserved-article-id'].data) --> 
14 
15<#-- Using Amazon tool --> 
16<#assign url = amazon_mp4_link.getData()> 
17 
18<#-- Using msci.com template --> 
19<#assign file=amazon_mp4_link.getData()?replace("https://s3.amazonaws.com/msci-www-media/","") > 
20<#assign rtmp_domain="s3u85i7y086pkm.cloudfront.net" > 
21<#assign web_domain="d1wh33plxfp85n.cloudfront.net" > 
22 
23 
24<#assign amazonTool = amazonAWSTool > 
25<#assign url = amazon_mp4_link.getData() > 
26<#assign fileArray = amazonTool.getVideoUrl(url) > 
27<#assign webUrl = fileArray[0] > 
28<#assign rtmpUrl = fileArray[1] > 
29<#assign rtmpDomain = fileArray[2] > 
30 
31 
32 
33<#if amazon_mp4_preview_tumbnail.getData() != "" > 
34    <#assign thumbnail_image = amazon_mp4_preview_tumbnail.getData() > 
35<#else> 
36    <#assign thumbnail_image = "/o/msci/images/msci-logo-video-image.jpg" > 
37</#if> 
38 
39 
40<div class="webcast-content"> 
41    <h1>${.vars['reserved-article-title'].data}</h1> 
42    <p>${content.getData()}</p> 
43 
44    <#if preview?? && preview?is_boolean && preview == true> 
45        <script type="text/javascript"> 
46            AUI().use("liferay-preview", function() { 
47                new Liferay.Preview({ 
48                    actionContent: '#${randomNamespace}_previewFileActions', 
49                    baseImageURL: '${preview.previewFileURL}', 
50                    boundingBox: '#${randomNamespace}_previewFile', 
51                    contentBox: '#${randomNamespace}_previewFileContent', 
52                    currentPreviewImage: '#${randomNamespace}_previewFileImage', 
53                    imageListContent: '#${randomNamespace}_previewImagesContent', 
54                    maxIndex: ${preview.previewFileCount}, 
55                    previewFileIndexNode: '#${randomNamespace}_previewFileIndex', 
56                    toolbar: '#${randomNamespace}_previewToolbar' 
57                }).render(); 
58            }); 
59        </script> 
60        <div class="lfr-preview-file" id="${randomNamespace}_previewFile"> 
61            <div class="lfr-preview-file-content" id="${randomNamespace}_previewFileContent"> 
62                <div class="lfr-preview-file-image-current-column"> 
63                    <div class="lfr-preview-file-image-container"> 
64                        <img class="lfr-preview-file-image-current" 
65                             id="${randomNamespace}_previewFileImage" 
66                             src="${preview.previewFileURL}1" /> 
67                    </div> 
68                    <span class="lfr-preview-file-actions aui-helper-hidden" id="${randomNamespace}_previewFileActions"> 
69								<span class="lfr-preview-file-toolbar" id="${randomNamespace}_previewToolbar"></span> 
70								<span class="lfr-preview-file-info"> 
71									<span class="lfr-preview-file-index" id="${randomNamespace}_previewFileIndex">1</span> 
72									of 
73									<span class="lfr-preview-file-count">${preview.previewFileCount}</span> 
74								</span> 
75							</span> 
76                </div> 
77 
78                <div class="lfr-preview-file-images" id="${randomNamespace}_previewImagesContent"> 
79                    <div class="lfr-preview-file-images-content"></div> 
80                </div> 
81            </div> 
82        </div> 
83    </#if> 
84 
85    <#if webUrl?? && webUrl?has_content > 
86        <#assign videoId = 'jwp7_' + .vars['reserved-article-id'].data + '_' + randomNamespace > 
87        <center style="margin:30px 0;"><div id="${videoId}">Loading ${.vars['reserved-article-title'].data}...</div></center> 
88        <script type="text/javascript"> 
89            var msciPlayerInstance = jwplayer("${videoId}"); 
90            var theTimeout; 
91            msciPlayerInstance.setup({ 
92                sources: [ 
93                    {file: "rtmp://${rtmpDomain}/cfx/st/mp4:${rtmpUrl}",image:"${thumbnail_image}"}, 
94                    {file: "${webUrl}",image:"${thumbnail_image}"} 
95                ], 
96                image:"${thumbnail_image}", 
97                rtmp: { 
98                    bufferlength: 3 
99                }, 
100                proxyType: "best", 
101                width:"65%", 
102                aspectratio:"4:3", 
103                stretching: 'bestfit', 
104                primary: "flash", 
105                //title:"${.vars['reserved-article-title'].data}", 
106                skin: { 
107                    name: "five" 
108
109                <#if vtt_chapters_file?? && vtt_chapters_file?has_content && vtt_chapters_file.getData()?? > 
110                    ,tracks: [{ 
111                    file:"${vtt_chapters_file.getData()}", 
112                    kind:"chapters" 
113                }] 
114                </#if> 
115                //, 
116                //logo: { 
117                //	file: '/o/msci/images/msci-logo-sm.png', 
118                //	link: 'https://support.msci.com' 
119                //} 
120            }); 
121 
122            msciPlayerInstance.onError(function(){ 
123                msciPlayerInstance.load({ 
124                    file:"${webUrl}", 
125                    image:"${thumbnail_image}" 
126                    <#if vtt_chapters_file?? && vtt_chapters_file?has_content && vtt_chapters_file.getData()?? > 
127                        ,tracks: [{ 
128                        file:"${vtt_chapters_file.getData()}", 
129                        kind:"chapters" 
130                    }] 
131                    </#if> 
132                }); 
133                msciPlayerInstance.play(); 
134            }); 
135 
136            msciPlayerInstance.onComplete(function(){ 
137                window.location = window.location.href; 
138            }); 
139 
140            msciPlayerInstance.onBuffer(function(){ 
141                theTimeout = setTimeout(function(){ 
142                    msciPlayerInstance.load({ 
143                        file:"${webUrl}", 
144                        image:"${thumbnail_image}" 
145                        <#if vtt_chapters_file?? && vtt_chapters_file?has_content && vtt_chapters_file.getData()?? > 
146                            ,tracks: [{ 
147                            file:"${vtt_chapters_file.getData()}", 
148                            kind:"chapters" 
149                        }] 
150                        </#if> 
151                    }); 
152                    msciPlayerInstance.play(); 
153                },8000); 
154            }); 
155 
156            msciPlayerInstance.onPlay(function(){ 
157                clearTimeout(theTimeout); 
158            }); 
159        </script> 
160 
161    <#-- -------------------------------------- 
162    ##  Handling ?timeoffset URL parameter 
163    ## -------------------------------------- --> 
164 
165        <script type="text/javascript"> 
166            //Extending MSCI object with getParameterByName(name, url) method 
167            if (typeof MSCI === "undefined") {var MSCI = {};} 
168            MSCI.urlHelper = { 
169                getParameterByName: function(name, url) { 
170                    if (!url) url = window.location.href; 
171                    name = name.replace(/[\[\]]/g, "\\$&"); 
172                    var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 
173                            results = regex.exec(url); 
174                    if (!results) return null; 
175                    if (!results[2]) return ''; 
176                    return decodeURIComponent(results[2].replace(/\+/g, " ")); 
177
178
179        </script> 
180 
181        <script type="text/javascript"> 
182 
183            //Extending msciPlayerInstance with cutom methods 
184 
185            msciPlayerInstance.isPositionExist = function(timePosition) { 
186                var videoDuration = this.getDuration(); 
187                return (videoDuration == 0 || videoDuration >= timePosition) ? true : false; 
188
189 
190            msciPlayerInstance.isPositionLoaded = function(timePosition) { 
191                var videoDuration = this.getDuration(); 
192                return (videoDuration != 0 && this.getBufferToPosition(timePosition) >= 100) ? true : false; 
193
194 
195            msciPlayerInstance.getBufferToPosition = function(timePosition) { 
196                var videoDuration = this.getDuration(); 
197                var positionPercent = (timePosition / videoDuration) * 100; 
198                var bufferPercent = this.getBuffer(); 
199                var ratio = parseInt((bufferPercent / positionPercent ) * 100) 
200                return ratio > 100 ? 100 : ratio; 
201
202 
203            /** 
204             * goToAndPlay(position, buffer_before_play) 
205
206             * This custom method starts buffering the video if needed, displays a preloader and informs the user about 
207             * the buffering progress till the reqested position (This was required because jwplayer by default can 
208             * only play video from a particular position once the given part is buffered - so this method starts 
209             * buffering if the position is not loaded and auto plays the video once the position is loaded) 
210
211             * @param timePosition {Integer} in seconds 
212             * @param buffer_before_play (boolean) true if video needs to be buffered to jump to the required position 
213             */ 
214            msciPlayerInstance.goToAndPlay = function(timePosition, buffer_before_play) { 
215                var self = this; 
216                var videoContainer = $(self.getContainer()); 
217                var videoDuration = this.getDuration(); 
218                var checkBufferLoop = null; 
219                var preloadMessage = $('' + 
220                        '<div class="buffering-preloader" style="font-size: 12px;color: #FFF;position: absolute;bottom: 32px;right: 0;left: 0;padding: 10px;text-align: center;background: rgba(0,0,0,0.7);">' + 
221                        '   Video will start automatically... <span class="percent"><span>' + 
222                        '</div>' 
223                ); 
224 
225                // Remove previous prealoader messages if there were any 
226                videoContainer.find('.buffering-preloader').remove(); 
227 
228                // If position is loaded, then go to and play/pause... and return 
229                if (self.isPositionLoaded(timePosition)) { 
230                    self.seek(timePosition); 
231                    return; 
232
233 
234                if (buffer_before_play) { 
235                    // If the video has never been started yet, play it to start buffering 
236                    if (self.getBuffer() === 0) { 
237                        self.play();                            // play the video to start buffering 
238                        self.on('firstFrame', function () {     // pause playing once video is loaded and let the video keep on buffering 
239                            self.play(false); //pause video 
240                        }) 
241
242                } else { 
243                    self.seek(timePosition); 
244
245 
246 
247                if (buffer_before_play) { 
248                    videoContainer.append(preloadMessage); 
249 
250                    // If timeOffset is buffered go to the requested position and play the video automatically 
251                    checkBufferLoop = setTimeout(playIfLoaded, 500); 
252                    function playIfLoaded() { 
253 
254                        // Stop if position does not exist in the video 
255                        if (!self.isPositionExist(timePosition)) { 
256                            //console.log('The requested position (' + timePosition + ' sec) does not exist is this video') 
257                            preloadMessage.remove(); 
258                            clearTimeout(checkBufferLoop); 
259                            return 
260
261 
262                        if (self.isPositionLoaded(timePosition)) { 
263                            self.seek(timePosition); 
264                            preloadMessage.remove(); 
265                            clearTimeout(checkBufferLoop); 
266                        } else { 
267                            preloadMessage.find('span.percent').html( self.getBufferToPosition(timePosition) + '%' ); 
268                            checkBufferLoop = setTimeout(playIfLoaded, 500); 
269
270
271 
272
273 
274
275        </script> 
276 
277        <script type="text/javascript"> 
278            /** 
279             * Handling 'timeoffset' URL parameter to auto play video from a position 
280             * http://localhost:8080/web/guest/webcast-sample-page#jwp7?timeoffset=300 
281             */ 
282            var timeOffset = MSCI.urlHelper.getParameterByName('timeoffset'); 
283            var goToAndPlayTimeout; 
284 
285            if (timeOffset) { 
286 
287                msciPlayerInstance 
288                        .onReady(function() { 
289                            this.goToAndPlay(timeOffset); 
290                        }) 
291                        .onError(function(){ 
292                            this.goToAndPlay(timeOffset); 
293                        }) 
294                        .onBuffer(function(){ 
295                            goToAndPlayTimeout = setTimeout(function(){ 
296                                //console.log("Failed loading movie viea rmpt, needs prebuffering to seek video"); 
297                                msciPlayerInstance.goToAndPlay(timeOffset, true); 
298                            },8000); 
299                        }) 
300                        .onPlay(function(){ 
301                            clearTimeout(goToAndPlayTimeout); 
302                        }); 
303
304        </script> 
305    <#--  /Handling ?timeoffset URL parameter --> 
306 
307 
308    </#if> 
309 
310    <#assign journalLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") > 
311    <#assign assetLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") > 
312    <#assign linkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") > 
313    <#assign dlAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService") > 
314    <#assign cnameLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService") > 
315 
316 
317<#-- get article's primaryKey --> 
318<#-- NOTE: be careful about input parameters types should match --> 
319    <#assign articlePrimKey = journalLocalService.getArticle(getterUtil.getLong(groupId), .vars['reserved-article-id'].data).getResourcePrimKey() > 
320 
321    <#assign catLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") > 
322 
323<#-- get article's category names by primaryKey --> 
324    <#assign articleCatNames = catLocalService.getCategoryNames("com.liferay.journal.model.JournalArticle", getterUtil.getLong(articlePrimKey)) > 
325 
326    <#assign asset=assetLocalService.getEntry("com.liferay.journal.model.JournalArticle", articlePrimKey) > 
327 
328<p> 
329    <#if (assetHelper.getLinkedFiles()?size > 0) > 
330        <h3>Download file</h3> 
331        <#list  assetHelper.getLinkedFiles() as file > 
332        <#-- ${file.getDLFileEntry()} --> 
333            <a href="http://${themeDisplay.portal-url}${themeDisplay.path-context}/documents/${file.getGroupId()}/${file.getUuid()}">${file.getTitle()}</a> 
334            <br> 
335        </#list> 
336    </#if> 
337    </p> 
338</div> 
339 
340<#-- Replace video link for Jive --> 
341<script type="text/javascript"> 
342    $(document).ready(function() { 
343        if ($('.webcast-content a[href*="support.msci.com/videos"]').length > 0) { 
344            var link = $('.webcast-content a[href*="support.msci.com/videos"]'); 
345            $('.webcast-content').append('<h3>Download File</h3>').append(link); 
346
347    }); 
348</script> 
349 
350<style> 
351    .jw-preview{ 
352        background-color: #FFFFFF; 
353
354    /* Chapter markers custom style */ 
355    .jw-controlbar .jw-controlbar-center-group .jw-slider-horizontal .jw-cue { 
356        border-width: 0; 
357        width: 8px; 
358        border-radius: 4px; 
359        background: #f65058; 
360        height: 8px; 
361        top: -2px; 
362
363    .jw-controlbar .jw-controlbar-center-group .jw-slider-horizontal .jw-cue:hover { 
364        background: #465058; 
365
366</style>