Fehler bei der Verarbeitung der Vorlage.
Java method "com.liferay.portal.repository.liferayrepository.model.LiferayFileEntry.getContentStream()" threw an exception when invoked on com.liferay.portal.repository.liferayrepository.model.LiferayFileEntry object "{\"mvccVersion\": 0, \"ctCollectionId\": 0, \"uuid\": \"6ee28799-224d-f931-4176-748b90f17313\", \"fileEntryId\": 4571535, \"groupId\": 31707, \"companyId\": 20116, \"userId\": 1526142, \"userName\": \"Elisa Widowitz\", \"createDate\": \"2023-09-28 13:45:39.339\", \"modifiedDate\": \"2023-09-28 13:45:40.117\", \"classNameId\": 0, \"classPK\": 0, \"repositoryId\": 31707, \"folderId\": 4571532, \"treePath\": \"/41869/314047/4571532/\", \"name\": \"194756\", \"fileName\": \"BKS_TrigosGala001.jpg\", \"extension\": \"jpg\", \"mimeType\": \"image/jpeg\", \"title\": \"BKS_TrigosGala001.jpg\", \"description\": \"\", \"extraSettings\": \"\", \"fileEntryTypeId\": 0, \"version\": \"1.0\", \"size\": 334775, \"smallImageId\": 0, \"largeImageId\": 0, \"custom1ImageId\": 0, \"custom2ImageId\": 0, \"manualCheckInRequired\": false, \"lastPublishDate\": null}"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: tmpImageBag = ImageToolUtil.read(entr... [in template "20116#20152#34063" at line 24, column 41] ----
1<#assign
2 DLFileEntryService = serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryService')
3 ImageToolUtil = serviceLocator.findService('com.liferay.portal.kernel.image.ImageToolUtil')
4 ImageService = serviceLocator.findService('com.liferay.portal.kernel.service.ImageService')
5/>
6
7<#if entries?has_content>
8 <#assign
9 imageMimeTypes = propsUtil.getArray("dl.file.entry.preview.image.mime.types")
10 pswpGalleryId = "pswp-gallery" + randomNamespace
11
12 itemCounter = 0
13 />
14
15 <div id="${pswpGalleryId}" class="row pswp-gallery content-image-gallery" itemscope itemtype="http://schema.org/ImageGallery">
16 <#list entries as entry>
17 <#if imageMimeTypes?seq_contains(entry.getMimeType())>
18 <#assign
19 itemCounter = itemCounter+1
20
21 imageAltText = entry.getDescription()
22 imageTitle = entry.getTitle()
23
24 tmpImageBag = ImageToolUtil.read(entry.getContentStream())
25 tmpImage = tmpImageBag.getRenderedImage()
26 imageSize = tmpImage.getWidth() + 'x' + tmpImage.getHeight()
27
28 imageUrl = dlUtil.getDownloadURL(entry, entry.getFileVersion(), themeDisplay, "")
29 imageThumbnailUrl = dlUtil.getThumbnailSrc(entry, entry.getFileVersion(), themeDisplay)
30
31 labelImage = languageUtil.get(locale, "image")
32 downloadLinkTitle = languageUtil.format(locale, "download-x", labelImage, false)
33 />
34 <div class="col-xs-12 col-sm-6 col-lg-3" >
35 <div class="content-image-gallery-item">
36 <figure class="pspw-gallery-item gallery-item-image" itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
37 <a class="aspect-ratio aspect-ratio-16-to-9" href="${imageUrl}" title="<@liferay.language key="show-image" />" itemprop="contentUrl" data-size="${imageSize}">
38 <img class="img-fluid aspect-ratio-item-center-middle" data-fileentryid="${entry.getFileEntryId()}" alt="${imageTitle}" src="${imageThumbnailUrl}" itemprop="thumbnail" />
39 <div class="gallery-item-image-overlay">
40 <svg aria-hidden="true" class="lexicon-icon scale-lexicon-icon">
41 <use xlink:href="#icon_zoom" />
42 </svg>
43 </div>
44 </a>
45 <figcaption class="sr-only" itemprop="caption description">${imageAltText}</figcaption>
46 </figure>
47 <div class="gallery-item-info">
48 <a class="gallery-item-download-link" href="${imageUrl}" title="${downloadLinkTitle}" download target="_blank">
49 <svg aria-hidden="true" class="lexicon-icon scale-lexicon-icon">
50 <use xlink:href="#icon_download" />
51 </svg>
52 </a>
53 </div>
54 </div>
55 </div>
56
57 <#if itemCounter%4 = 0>
58 <div class="clearfix visible-sm-block visible-lg-block"></div>
59 <#elseif itemCounter%2 = 0>
60 <div class="clearfix visible-sm-block"></div>
61 </#if>
62 </#if>
63 </#list>
64 </div>
65
66 <script>
67 Liferay.Loader.require([
68 'bks-main-theme-js-modules@2.0.0/photoswipe/photoswipe.min',
69 'bks-main-theme-js-modules@2.0.0/photoswipe/photoswipe-ui-default.min',
70 'bks-main-theme-js-modules@2.0.0/photoswipe/photoswipe-from-dom'
71 ],
72 function( PhotoSwipe, PhotoSwipeUI_Default, PhotoSwipeFromDOM) {
73 PhotoSwipeFromDOM(".pswp-gallery", PhotoSwipe, PhotoSwipeUI_Default);
74 },
75 function(error) {
76 console.error(error);
77 }
78 );
79 </script>
80<#else>
81there-are-no-images
82</#if>