Breadcrumb

static header - MOSES - MULTIMEDIA

MULTIMEDIA

Asset Publisher

An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy67.getFolder(long, long, String)" threw an exception when invoked on com.sun.proxy.$Proxy67 object "com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl@5a5d3d63"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign folderRootId = dlFolderLocalS...  [in template "20099#20135#69819" at line 6, column 5]
----
1<#if entries?has_content> 
2    <#assign dlFolderLocalService=serviceLocator.findService("com.liferay.document.library.kernel.service.DLFolderLocalService") /> 
3    <#assign dlFileEntry=serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") /> 
4    <#assign dlUtil=serviceLocator.findService("com.liferay.document.library.kernel.util.DLUtil") /> 
5    <#assign folderRootName="Multimedia Galleries" /> 
6    <#assign folderRootId=dlFolderLocalService.getFolder(groupId, 0 ,folderRootName).getFolderId() /> 
7    <#assign dlFoldersChildren=dlFolderLocalService.getFolders(groupId, folderRootId) /> 
8    <div class="multimedia-page"> 
9        <div class="row d-flex justify-content-center align-items-center pt-5 pb-5"> 
10            <div class="col-md-6 col-sm-8 col-xs-8"> 
11                <!--<div class="row justify-content-center align-items-center"> <h2 class="multimedia-title pb-4 pt-2">SELECT GALLERY:</h2> </div>--> 
12                <div class="form"> 
13                    <div class="row justify-content-center align-items-center"> 
14                        <!--<label for="formControl">--> <h2 class="col-md-12 multimedia-title pb-4 pt-2">SELECT GALLERY:</h2> 
15                        <!--</label>--> 
16                        <#if dlFoldersChildren?size lte 0> 
17                            <div>No Images Available.</div> 
18                        </#if> 
19                    </div> 
20                    <#if dlFoldersChildren?size gt 0> 
21                        <#assign id=0 /> 
22                        <#assign url=themeDisplay.getURLCurrent() /> 
23                        <#if url?contains("?id=")> <#assign id = themeDisplay.getURLCurrent()?split("?id=")[1] /> </#if><#if dlFoldersChildren?size gt 0>  
24                        	<div class="d-flex justify-content-center align-items-center"> 
25	                            <select style=" height: auto !important;" onchange="javascript:handleSelect(this)" class="form-control-lg icon pl-4 pr-4 pt-3 pb-3" id="formControl" data-show-content="true"> 
26	                            <#-- <option value="">Gallery...</option> --> 
27		                            <#list dlFoldersChildren as c> 
28		                                <#if c.getFolderId()==id?number> 
29		                                    <option selected value="${c.getFolderId()}"> 
30		                                <#else> 
31		                                    <option value="${c.getFolderId()}"> 
32		                                </#if> ${c.getName()} </option> 
33		                                <!--<#if !c?is_last> <option <#if c.getFolderId() == id?number> selected </#if> value="${c.getFolderId()}"> <#if c.getName()?length &gt; 40> ${c.getName()?substring(0,39)}... <#else> ${c.getName()} </#if> </option> <#else> <option value="${c.getFolderId()}" <#if c.getFolderId() == id?number> selected </#if>> <#if c.getName()?length &gt; 40> ${c.getName()?substring(0,39)}... <#else> ${c.getName()} </#if> </option> </#if>--> 
34		                            </#list>  
35	                        	</select> 
36	                        </div> 
37                        </#if> 
38                    </#if> 
39                </div> 
40                <!--<div class="row justify-content-center align-items-center"> <div class="dropdown"> <button class="bottone dropdown-toggle w-100 d-flex justify-content-between pl-4 pr-4 pt-3 pb-3" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <div class="mb-0">Gallery...</div> <i class="fas fa-sort-down"></i> </button> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <#list dlFoldersChildren as c> <#if !c?is_last> <a class="dropdown-item p-3 border-bottom" href="?id=${c.getFolderId()}">${c.getName()}</a> <#else> <a class="dropdown-item p-3" href="?id=${c.getFolderId()}">${c.getName()}</a> </#if> </#list> </div> </div> </div>--> 
41            </div> 
42        </div> 
43        <#assign url=themeDisplay.getURLCurrent() /> 
44        <#if url?contains("?id=")>  
45        <#assign id = themeDisplay.getURLCurrent()?split("?id=")[1] />  
46        <#assign fileList = dlFileEntry.getFileEntries(groupId, id?number) />  
47        <#if fileList?size gt 0> 
48            <div class=" custom-carousel"> 
49            <#if fileList?has_content> 
50                <div id="customcarousel" class="carousel slide carousel-thumbnails" data-ride="carousel"> 
51                    <#assign imageMimeTypes=propsUtil.getArray("dl.file.entry.preview.image.mime.types") /> 
52                    <#assign videoMimeTypes=propsUtil.getArray("dl.file.entry.preview.video.mime.types") /> 
53                    <#assign count=0 /> <!-- Indicators --> 
54                    <div class="maxwidth-class carousel-indicators"> 
55                        <#list fileList as entry> 
56                            <#if imageMimeTypes?seq_contains(entry.getMimeType())> 
57                                <#assign assetEntryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
58                                <#assign assetEntry=assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", entry.fileEntryId) /> 
59                                <#assign assetRenderer=assetEntry.assetRenderer /> 
60                                <#assign docUrl=assetRenderer.getURLDownload(themeDisplay) /> 
61                                <#if count==0> 
62                                    <div data-target="#customcarousel" data-slide-to="${count}" class="car-ind-element active"> <img class="thumbnail img-fluid fluidImg" src="${docUrl}">  
63                                    </div> 
64                                <#else> 
65                                    <div data-target="#customcarousel" data-slide-to="${count}" class="car-ind-element"> <img class="thumbnail img-fluid fluidImg" src="${docUrl}"> </div> 
66                                </#if> 
67                                <#assign count=count+1 /> 
68                                <#elseif videoMimeTypes?seq_contains(entry.getMimeType())> 
69                                    <#assign assetEntryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
70                                    <#assign assetEntry=assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", entry.fileEntryId) /> 
71                                    <#assign assetRenderer=assetEntry.assetRenderer /> 
72                                    <#assign docUrl=assetRenderer.getURLDownload(themeDisplay) /> 
73                                    <#if count==0> 
74                                        <div data-target="#customcarousel" data-slide-to="${count}" class="car-ind-element active"> <img class="thumbnail img-fluid fluidImg" src="/documents/20126/0/Play.png"> </div> 
75                                            <#else> 
76                                                <div data-target="#customcarousel" data-slide-to="${count}" class="car-ind-element"> <img class="thumbnail img-fluid fluidImg" src="/documents/20126/0/Play.png"> </div> 
77                                    </#if> 
78                                    <#assign count=count+1 /> 
79                            </#if> 
80                        </#list> 
81                    </div> <!-- The slideshow --> 
82                    <div class="carousel-inner"> 
83                        <#assign count=0 /> 
84                        <#list fileList as entry> 
85                            <#if imageMimeTypes?seq_contains(entry.getMimeType())> 
86                                <#assign assetEntryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
87                                <#assign assetEntry=assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", entry.fileEntryId) /> 
88                                <#assign assetRenderer=assetEntry.assetRenderer /> 
89                                <#assign docUrl=assetRenderer.getURLDownload(themeDisplay) /> 
90                                <#if count==0> 
91                                    <div class="carousel-item active"> <img src="${docUrl}"> </div> 
92                                <#else> 
93                                    <div class="carousel-item"> <img src="${docUrl}"> </div> 
94                                </#if> 
95                                <#assign count=count+1 /> 
96                                <#elseif videoMimeTypes?seq_contains(entry.getMimeType())> 
97                                    <#assign assetEntryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
98                                    <#assign assetEntry=assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", entry.fileEntryId) /> 
99                                    <#assign assetRenderer=assetEntry.assetRenderer /> 
100                                    <#assign docUrl=assetRenderer.getURLDownload(themeDisplay) /> 
101                                    <#if count==0> 
102                                        <div class="carousel-item active"> <video class="video-fluid" controls> 
103                                                <source src="${docUrl?keep_before_last('/')?replace('http://localhost:8080','')}" type="${entry.getMimeType()}" /> </video> </div> 
104                                        <#else> 
105                                            <div class="carousel-item"> <video class="video-fluid" controls> 
106                                                    <source src="${docUrl?keep_before_last('/')?replace('http://localhost:8080','')}" type="${entry.getMimeType()}" /> </video> </div> 
107                                    </#if> 
108                                    <#assign count=count+1 /> 
109                            </#if> 
110                        </#list> 
111                    </div> <!-- Left and right controls --> 
112                    <#if fileList?size gt 1> <a class="carousel-control-prev" href="#customcarousel" data-slide="prev"> <span class="carousel-control-prev-icon"> </span> </a> <a class="carousel-control-next" href="#customcarousel" data-slide="next"> <span class="carousel-control-next-icon"> </span> </a> </#if> 
113                </div> 
114                <#else> 
115                    <p class="no-content-available pl-5"> No Media Item Found </p> 
116            </#if> 
117            </div> 
118        </#if> 
119</#if> 
120</div> 
121</#if> 
122<script> 
123/* VIDEO */ 
124// if video slide is active, play video & pause carousel 
125// if video done playing, continue to cycle carousel 
126$(document).ready(function() { 
127 
128    var url = window.location.href; 
129 
130    if(url.indexOf('id=') < 0){ 
131        var firstOptionId = $("#formControl option:first").val(); 
132        window.location = url + '?id=' + firstOptionId; 
133
134    else{ 
135 
136        if (url.indexOf("?") > -1) { 
137            $('html,body').animate({ 
138                scrollTop: $(".multimedia-page").offset().top 
139            }, 'slow'); 
140
141 
142        /* VIDEO */ 
143        $('.video-fluid').each(function() { 
144            $(this).on('pause', function() { 
145                $('#customcarousel').carousel('cycle'); 
146            }) 
147        }); 
148        $('.video-fluid').each(function() { 
149            $(this).on('play', function() { 
150                $('#customcarousel').carousel('pause'); 
151            }) 
152        }); 
153 
154        /*var text = $("option:selected").text(); 
155        if (text.length > 45) { 
156            console.log("dentro"); 
157            text = text.substring(0, 44) + '...'; 
158            $("option:selected").text(text); 
159        }*/ 
160
161}); 
162 
163function handleSelect(elm) { 
164    if (elm.value != "") { 
165        window.location = "?id=" + elm.value; 
166    } else { 
167        var url = window.location.href; 
168 
169        if (url.indexOf("?") > -1) { 
170            url = url.substr(0, url.indexOf("?")); 
171
172        window.location = url; 
173
174 
175    /*var text = $('select').text(); 
176    if (text.length > 50) { 
177        console.log("dentro"); 
178        text = text.substring(0, 49) + '...'; 
179        $('select').text(text); 
180    }*/ 
181
182</script> 
183<style type="text/css"> 
184     .no-content-available{color:#003399;}  
185</style> 

Form

STAY UPDATED!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies quam eu tortor cursus pellentesque.

Register to our newsletter