Wydawca treści Wydawca treści

Wystąpił błąd podczas przetwarzania szablonu.
Error on line 82, column 17 in 10097#20183917#ARTICLE
dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) is undefined.
It cannot be assigned to image
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
2<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") /> 
3<#assign imageLocalService = serviceLocator.findService("com.liferay.portal.service.ImageLocalService") /> 
4 
5<#assign journalArticleId = .vars["reserved-article-id"].data?replace('.', '-') /> 
6<#assign journalArticle = journalArticleLocalService.getArticle(getterUtil.getLong(groupId), journalArticleId) /> 
7<#assign journalArticleCreateDate = journalArticle.getCreateDate() /> 
8<#assign journalArticleModifiedDate = journalArticle.getModifiedDate() /> 
9<#assign journalArticleAuthor = .vars["reserved-article-author-name"].data /> 
10<#if coauthors?? && coauthors.data?has_content> 
11    <#assign journalArticleAuthor = coauthors.data /> 
12</#if> 
13<#if title?? && title.data?has_content> 
14    <#assign journalArticleTitle = title.data /> 
15<#else> 
16    <#assign journalArticleTitle = .vars["reserved-article-title"].data /> 
17</#if> 
18<#assign journalArticleUrlTitle = journalArticle.getUrlTitle() /> 
19 
20<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext() /> 
21<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
22<#assign portletId = themeDisplay.getPortletDisplay().getId() /> 
23 
24<div id="article-${journalArticleId}" class="nfh-cp-article"> 
25 
26    <h1 class="title">${journalArticleTitle}</h1> 
27 
28    <#if showcreatedate?? && showcreatedate.data == "true"> 
29        <#assign journalArticleModifiedDate = journalArticle.getCreateDate() /> 
30    </#if> 
31    <div class="metadata">${journalArticleModifiedDate?string["dd.MM.yyyy"]} | ${journalArticleAuthor}</div> 
32 
33    <#-- MEDIA SPOŁECZNOŚCIOWE --> 
34    <#assign printGroupId = "" /> 
35    <#if journalArticle.groupId != themeDisplay.scopeGroupId> 
36        <#assign printGroupId = themeDisplay.scopeGroupId /> 
37    </#if> 
38    <div class="social-media"> 
39        <div class="addthis_toolbox addthis_default_style"> 
40            <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> 
41            <a class="addthis_button_google_plusone" g:plusone:size="medium"></a> 
42            <a class="addthis_button_tweet"></a> 
43            <img title="${languageUtil.get(locale, "print")}" src="${themeDisplay.pathThemeImages}/nfh-cp/icon-print-20x17.png"  
44                onclick="Nfhcp.AssetPublisherPortlet.printFullContent('${portletId}', '${journalArticleId}', '${printGroupId}', '${journalArticleUrlTitle}');" class="print"> 
45            <script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script> 
46            <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-55c31ccb1e1d814d"></script> 
47        </div> 
48    </div> 
49 
50    <#-- ZDJĘCIA DO GALERII --> 
51    <#assign galleryImages = [] /> 
52    <#assign mainGalleryUuid = "" /> 
53    <#assign imageDesc = ""/> 
54 
55    <#-- Zdjęcie główne z galerii --> 
56    <#if mainphotogallery?? && mainphotogallery.data?has_content> 
57        <#assign url = mainphotogallery.data /> 
58        <#if url?starts_with("/image/image_gallery")> 
59            <#assign uuid = httpUtil.getParameter(url, "uuid", false)?string /> 
60            <#assign groupId = getterUtil.getLong(httpUtil.getParameter(url, "groupId", false), 0) /> 
61            <#if dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) ?? > 
62                <#assign image = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) /> 
63 
64                <#if image??> 
65                    <#assign mainGalleryUuid = uuid /> 
66                    <#assign imageDesc = htmlUtil.escapeAttribute(image.description) /> 
67                </#if> 
68 
69                <#assign galleryImage = {"url" : mainphotogallery.data, "thumbUrl" : mainphotogallery.data + "&width=250", "desc" : imageDesc, "uuid" : mainGalleryUuid} /> 
70                <#assign galleryImages = galleryImages + [galleryImage] /> 
71            </#if> 
72        <#elseif url?contains("/documents/")> 
73            <#assign urlParts = stringUtil.split(url, "?") /> 
74            <#assign urlParts = stringUtil.split(urlParts[0]?string, "/") /> 
75            <#assign groupId = getterUtil.getLong(urlParts[2]) /> 
76            <#assign folderId = getterUtil.getLong(urlParts[3]) /> 
77            <#assign title = httpUtil.decodeURL(urlParts[4]?string, true) /> 
78 
79            <#if urlParts?size gt 5> 
80                <#assign uuid = urlParts[5]?string /> 
81                <#assign mainGalleryUuid = uuid /> 
82                <#assign image = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) /> 
83            <#else> 
84                <#assign image = dlFileEntryLocalService.getFileEntry(groupId, folderId, title) /> 
85                <#assign mainGalleryUuid = image.uuid /> 
86            </#if> 
87 
88 
89            <#assign galleryImage = {"url" : mainphotogallery.data, "thumbUrl" : mainphotogallery.data, "desc" : htmlUtil.escapeAttribute(image.description), "uuid" : mainGalleryUuid} /> 
90            <#assign galleryImages = galleryImages + [galleryImage] /> 
91        </#if> 
92    <#-- Zdjęcie główne --> 
93    <#elseif mainphoto?? && mainphoto.data?has_content> 
94        <#assign galleryImage = {"url" : mainphoto.data, "thumbUrl" : mainphoto.data, "desc" : htmlUtil.escapeAttribute(mainphoto.maindesc.data), "uuid" : "----"} /> 
95        <#assign galleryImages = galleryImages + [galleryImage] /> 
96    </#if> 
97 
98    <#-- Zdjęcia dodatkowe z dysku --> 
99    <#if additionalphoto?? > 
100        <#list additionalphoto.getSiblings() as additionalphotoItem> 
101            <#if additionalphotoItem.data?has_content> 
102                <#assign galleryImage = {"url" : additionalphotoItem.data, "thumbUrl" : additionalphotoItem.data, "desc" : htmlUtil.escapeAttribute(additionalphotoItem.photodescription.data), "uuid" : "----"} /> 
103                <#assign galleryImages = galleryImages + [galleryImage] /> 
104            </#if> 
105        </#list> 
106    </#if> 
107 
108    <#-- Zdjęcia z galerii --> 
109    <#if additionalphotogallery?? && additionalphotogallery.data?has_content> 
110        <#assign url = additionalphotogallery.data /> 
111        <#if url?starts_with("/image/image_gallery")> 
112            <#assign uuid = httpUtil.getParameter(url, "uuid", false)?string /> 
113            <#assign groupId = getterUtil.getLong(httpUtil.getParameter(url, "groupId", false), 0) /> 
114 
115            <#if dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId)?? > 
116                <#assign image = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) /> 
117            </#if> 
118        <#elseif url?contains("/documents/")> 
119            <#assign urlParts = stringUtil.split(url, "/") /> 
120            <#assign groupId = getterUtil.getLong(urlParts[2]) /> 
121            <#assign folderId = getterUtil.getLong(urlParts[3]) /> 
122            <#assign title = httpUtil.decodeURL(urlParts[4]?string, true) /> 
123 
124            <#if dlFileEntryLocalService.getFileEntry(groupId, folderId, title)?? > 
125                <#assign image = dlFileEntryLocalService.getFileEntry(groupId, folderId, title) /> 
126            </#if> 
127        </#if> 
128 
129        <#if image??> 
130            <#assign folderId = image.folderId /> 
131            <#assign folderImages = dlFileEntryLocalService.getFileEntries(groupId, folderId) /> 
132            <#if folderImages??> 
133                <#list folderImages?sort_by("name") as folderImage> 
134                    <#if folderImage.uuid != mainGalleryUuid> 
135                        <#assign folderImageDescription = folderImage.description /> 
136                        <#if folderImage.description?lower_case == folderImage.title?lower_case + folderImage.extension?lower_case> 
137                            <#assign folderImageDescription = "" /> 
138                        </#if> 
139 
140                        <#assign galleryImage = {"url" : "/image/image_gallery?uuid=" + folderImage.uuid + "&groupId=" + folderImage.groupId, 
141                            "thumbUrl" : "/image/image_gallery?uuid=" + folderImage.uuid + "&groupId=" + folderImage.groupId, 
142                            "desc" : htmlUtil.escapeAttribute(folderImageDescription), 
143                            "uuid" : folderImage.uuid} /> 
144                        <#assign galleryImages = galleryImages + [galleryImage] /> 
145                    </#if> 
146                </#list> 
147            </#if> 
148        </#if> 
149    </#if> 
150 
151    <#-- GALERIA OBRAZÓW --> 
152    <#if galleryImages?size gt 1> 
153        <div id="gallery-${journalArticleId}" class="multiple-image-gallery royalSlider rsDefault"> 
154            <#list galleryImages as galleryImage> 
155                <a href="${galleryImage.url}&width=560" class="rsImg" data-rsbigimg="${galleryImage.url}"> 
156                    <img src="${galleryImage.thumbUrl}&width=250" uuid="${galleryImage.uuid}" class="rsTmb" /> 
157                    ${galleryImage.desc} 
158                </a> 
159            </#list> 
160        </div> 
161    <#elseif galleryImages?size == 1> 
162        <div class="single-image-gallery"> 
163            <div id="gallery-${journalArticleId}"> 
164                <#list galleryImages as galleryImage> 
165                    <a href="${galleryImage.url}" rel="lightbox" title="${htmlUtil.escape(galleryImage.desc)}"> 
166                        <img src="${galleryImage.url}&width=716" alt="${htmlUtil.escape(galleryImage.desc)}" /> 
167                        <#if galleryImage.desc?has_content> 
168                            <div class="mainphotogallery-description">${galleryImage.desc}</div>  
169                        </#if> 
170                    </a> 
171                </#list> 
172            </div> 
173        </div> 
174    </#if> 
175 
176    <#-- ZAWARTOŚĆ ARTYKUŁU --> 
177    <#if abstract?? && abstract.data?has_content> 
178        <p class="description">${abstract.data}</p> 
179    <#else> 
180        <p class="description">${.vars["reserved-article-description"].data}</p> 
181    </#if> 
182 
183    <div class="content">${content.data}</div> 
184 
185    <#-- ZAŁĄCZNIKI --> 
186    <#assign hasAttachments = false /> 
187    <#if file?? && file.getSiblings()?size gt 0> 
188        <#list file.getSiblings() as fileItem> 
189            <#if fileItem.filedescription?? && fileItem.filedescription.data?has_content> 
190                <#assign fileItemName = fileItem.filedescription.data /> 
191            <#elseif fileItem.filetitle?? && fileItem.filetitle.data?has_content> 
192                <#assign fileItemName = fileItem.filetitle.data /> 
193            <#else> 
194                <#assign fileItemName = fileItem.data /> 
195            </#if> 
196            <#if fileItemName?? && fileItemName?has_content> 
197                <#assign hasAttachments = true /> 
198            </#if> 
199        </#list> 
200    </#if> 
201    <#if hasAttachments> 
202        <div class="attachments"> 
203            <h2>${languageUtil.get(locale, "resources-to-get")}</h2> 
204            <ul class="attachment-list"> 
205                <#list file.getSiblings() as fileItem> 
206                    <#if fileItem.filedescription?? && fileItem.filedescription.data?has_content> 
207                        <#assign fileItemName = fileItem.filedescription.data /> 
208                    <#elseif fileItem.filetitle?? && fileItem.filetitle.data?has_content> 
209                        <#assign fileItemName = fileItem.filetitle.data /> 
210                    <#else> 
211                        <#assign fileItemName = fileItem.data /> 
212                    </#if> 
213 
214                    <#if fileItemName?? && fileItemName?has_content> 
215                        <#assign url = fileItem.data /> 
216                        <#if url?contains("/documents/")> 
217                            <#assign urlParts = stringUtil.split(url, "?") /> 
218                            <#assign urlParts = stringUtil.split(urlParts[0]?string, "/") /> 
219                            <#assign groupId = getterUtil.getLong(urlParts[2]) /> 
220                            <#assign folderId = getterUtil.getLong(urlParts[3]) /> 
221                            <#assign title = httpUtil.decodeURL(urlParts[4]?string, true) /> 
222                            <#if urlParts?size gt 5> 
223                                <#assign uuid = urlParts[5]?string /> 
224                                <#if dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId)?? > 
225                                    <#assign file = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) /> 
226                                </#if> 
227                            <#else> 
228                                <#if dlFileEntryLocalService.getFileEntry(groupId, folderId, title)?? > 
229                                    <#assign file = dlFileEntryLocalService.getFileEntry(groupId, folderId, title) /> 
230                                </#if> 
231                            </#if> 
232                            <#if file?? && file.icon??> 
233                                <#assign fileIcon = file.icon + ".png" /> 
234                            </#if> 
235                        </#if> 
236                        <#if !fileIcon?? || !fileIcon?has_content> 
237                            <#assign fileItemExt = fileItem.data /> 
238                            <#assign indexOfDot = fileItemExt?last_index_of(".") + 1 /> 
239                            <#assign indexOfSlash = fileItemExt?last_index_of("/") /> 
240                            <#if indexOfSlash gt indexOfDot> 
241                                <#assign fileItemExt = fileItemExt?substring(0, indexOfSlash) /> 
242                            </#if> 
243                            <#assign fileIcon = fileItemExt?substring(indexOfDot) + ".png" /> 
244                        </#if> 
245                        <li> 
246                            <a href="${fileItem.data}" target="_blank"><img src="${themeDisplay.pathThemeImages}/file_system/small/${fileIcon}"></a> 
247                            <a href="${fileItem.data}" target="_blank">${fileItemName}</a> 
248                        </li> 
249                    </#if> 
250                </#list> 
251            </ul> 
252        </div> 
253    </#if> 
254</div>