Si è verificato un errore nell'elaborarazione del modello.
Java method "com.sun.proxy.$Proxy163.getFileEntryByUuidAndGroupId(String, long)" threw an exception when invoked on com.sun.proxy.$Proxy163 object "com.liferay.document.library.internal.service.SubscriptionDLAppLocalServiceWrapper@78e0aff1"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: fileEntry = dlAppLocalServiceUtil.get...  [in template "20100#20126#6644845" at line 17, column 17]
----
1<#assign 
2articleTitle = .vars['reserved-article-title'].data 
3dlAppLocalServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService") 
4hasFileData = DocumentLibrary65839617?? 
5data = hasFileData?then(DocumentLibrary65839617.get("data"), {}) 
6json = jsonFactoryUtil.createJSONObject(data) 
7fileUuid = json.getString("uuid") 
8fileGroupId = json.getLong("groupId") 
9hasFile = data?has_content && fileUuid?has_content 
10/> 
11 
12<main> 
13    <section class="article legal-article content "> 
14        <div class="pdf-history-section d-none"> 
15            <#if hasFile> 
16                <#assign 
17                fileEntry = dlAppLocalServiceUtil.getFileEntryByUuidAndGroupId(fileUuid, fileGroupId) 
18                allVersions = fileEntry.getFileVersions(0) 
19
20                <div class="download-section"> 
21                    <button class="download history-control-btn font-H100" aria-label="back-to-newest-version"> < <@liferay.language key="document-history" /></button> 
22                    <#if articleTitle??> 
23                        <h2 class="title-article-documents font-H400 font-strong">${articleTitle}</h2> 
24                    </#if> 
25                    <div class="row"> 
26                        <div class="file-versions"> 
27                            <#list allVersions as fileVersion> 
28                                <#assign 
29                                fileDate = fileVersion.getReviewDate()?has_content?then(fileVersion.getReviewDate()?date?string["dd.MM.yyyy"], 
30                                fileVersion.getCreateDate()?date?string["dd.MM.yyyy"]) 
31
32                                <div class="file-version"> 
33                                    <div class="information"> 
34                                        <p class="font-H200 font-strong">${articleTitle}</p> 
35                                        <p class="font-T400"> 
36                                            <span>${fileVersion.getVersion()}</span> 
37                                            <span>· </span> 
38                                            <span>${fileDate}</span></p> 
39                                        <a class="download-link" href="${getFileEntryURL(fileEntry, fileVersion)}" 
40                                           aria-label="<@liferay.language key='download-pdf' /> ${articleTitle} in version ${fileVersion.getVersion()}"> 
41                                            <@liferay.language key="download-pdf" /> 
42                                        </a> 
43                                    </div> 
44                                    <img class="caret" src="/o/zondacrypto-theme/images/icons/CaretRight.svg" alt=""> 
45                                </div> 
46                            </#list> 
47                        </div> 
48                    </div> 
49                </div> 
50            </#if> 
51        </div> 
52        <div class="article-content-wrapper"> 
53            <#if articleTitle??> 
54                <h1 class="font-H400 font-strong">${articleTitle}</h1> 
55            </#if> 
56            <#if hasFile> 
57                <div class="simple-download-section"> 
58                    <a href="${DocumentLibrary65839617.getData()}" class="zonda-primary-btn-md"> 
59                        <span class="download"></span> 
60                        <@liferay.language key="download-pdf" /> 
61                    </a> 
62                    <button class="zonda-secondary-btn-md history-control-btn"><span class="clock"></span><@liferay.language key="document-history" /></button> 
63                </div> 
64            </#if> 
65 
66 
67            <#if (content.getData())??> 
68                <div class="content"> 
69                    ${content.getData()} 
70                </div> 
71            </#if> 
72        </div> 
73 
74    </section> 
75</main> 
76 
77<#function getFileEntryURL fileEntry fileVersion> 
78    <#assign 
79    time = fileVersion.getModifiedDate()?time 
80    /> 
81    <#return themeDisplay.getPathContext() + "/documents/" + fileEntry.getRepositoryId()?c + "/" 
82    + fileEntry.getFolderId()?c + "/" + urlCodec.encodeURL(htmlUtil.unescape(fileEntry.getTitle()), true) + "/" + fileEntry.getUuid() 
83    + "?version=" + fileVersion.getVersion() + "&t=" + time 
84
85</#function> 
86 
87<script> 
88    if (window.location.hash === "#show-history") { 
89        let historySection = document.querySelector(".pdf-history-section"); 
90        let articleContent = document.querySelector(".legal-article.content"); 
91        if (historySection) { 
92            historySection.classList.toggle("d-none"); 
93            articleContent.classList.toggle("history-show"); 
94
95
96    document.querySelectorAll(".history-control-btn").forEach(element => { 
97        element.addEventListener("click", (e) => { 
98            let historySection = document.querySelector(".pdf-history-section"); 
99            let articleContent = document.querySelector(".legal-article.content"); 
100            if (historySection) { 
101                historySection.classList.toggle("d-none"); 
102                articleContent.classList.toggle("history-show"); 
103                if (window.location.hash === "") { 
104                    window.location.hash = "show-history" 
105                } else { 
106                    history.pushState("", document.title, window.location.pathname 
107                        + window.location.search); 
108
109
110            if (!historySection.classList.contains("d-none")) { 
111                const historyBtn = historySection.querySelector(".history-control-btn"); 
112                if (historyBtn) { 
113                    historyBtn.focus(); 
114
115                else { 
116                    element.focus(); 
117
118
119        }) 
120    }) 
121 
122    document.querySelectorAll(".file-version").forEach(fileElement => { 
123        fileElement.addEventListener("click", (e) => { 
124            fileElement.querySelector("a").click(); 
125        }) 
126    }) 
127</script>