Breadcrumb

Asset Publisher

An error occurred while processing the template.
The following has evaluated to null or missing:
==> fileLinksTitle[file?number - 1]  [in template "20099#20135#68566" at line 21, column 47]

----
Tip: It's the final [] step 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: #assign fileLink = fileLinksTitle[fil...  [in template "20099#20135#68566" at line 21, column 29]
----
1<#assign splitter=themeDisplay.getURLCurrent()?split("?")> 
2    <#assign s=splitter?last /> 
3    <#assign val=s?split("&") /> 
4    <#if val?size gte 3> 
5        <#assign ids=val[0]?split("=") />  
6        <#assign nAccs = val[1]?split("=") /> 
7         <#assign files = val[2]?split("=") />  
8         <#assign id = ids[1] /> 
9          <#assign nAcc = nAccs[1] />  
10          <#assign file = files[1] /> 
11           <#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
12            <#assign assetEntryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")> 
13 
14                <#assign article=journalArticleLocalService.getArticle(groupId, id)> 
15                        <#if article?has_content> 
16                            <#assign docXml=saxReaderUtil.read(article.getContent()) /> 
17                            <#assign listaAccordion=docXml.getRootElement().selectNodes("dynamic-element[@name='AccordionTitle' ]") /> 
18                            <#assign accordion=listaAccordion[nAcc?number - 1] /> 
19                            <#assign a=accordion.valueOf("dynamic-content/text()") /> 
20                            <#assign fileLinksTitle=accordion.selectNodes("dynamic-element[@name='FileLinkTitle' ]") /> 
21                            <#assign fileLink=fileLinksTitle[file?number - 1] /> 
22                            <#assign fTitle=fileLink.valueOf("dynamic-content/text()") /> 
23                            <#assign fDescription=fileLink.valueOf("dynamic-element[@name='FileDescription' ]/dynamic-content/text()") /> 
24                            <#assign fAttachment=fileLink.valueOf("dynamic-element[@name='FileAttachment' ]/dynamic-content/text()") /> 
25                            <#assign image=fileLink.valueOf("dynamic-element[@name='FileImage' ]/dynamic-content/text()") /> 
26                            <#assign imgUrl='' /> 
27                            <#if image?has_content> 
28                                <#assign jsonObject1=image?eval /> 
29                                <#assign entryUuid1=jsonObject1.uuid /> 
30                                <#assign entryGroupId1=getterUtil.getLong(jsonObject1.groupId) /> 
31                                <#assign dlFileEntryLocalService=serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
32                                    <#assign dlFileEntry1=dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(entryUuid1, entryGroupId1) /> 
33                                    <#assign assetEntry1=assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", dlFileEntry1.fileEntryId) /> 
34                                    <#assign assetRenderer1=assetEntry1.assetRenderer /> 
35                                    <#assign imgUrl=assetRenderer1.getURLDownload(themeDisplay) /> 
36                            </#if> 
37                            <#if fAttachment?has_content> 
38                                <#assign jsonObject=fAttachment?eval /> 
39                                <#assign entryUuid=jsonObject.uuid /> 
40                                <#assign entryGroupId=getterUtil.getLong(jsonObject.groupId) /> 
41                                <#assign dlFileEntryLocalService=serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
42                                <#assign dlFileEntry=dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(entryUuid, entryGroupId) /> 
43                                <#assign assetEntry=assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", dlFileEntry.fileEntryId) /> 
44                                <#assign assetRenderer=assetEntry.assetRenderer /> 
45                                <#assign fileUrl=assetRenderer.getURLDownload(themeDisplay) />  
46                                <#assign fileUrlView=fileUrl />  
47                                <#if fileUrl?contains('&download=true')> 
48                                    <#assign fileUrlView=fileUrl?replace('&download=true', '') />                                      
49                                </#if> 
50                            </#if> 
51                            <div class="docsDetails pb-5"> 
52                                <!-- 
53                                <div class="breadcrumb-details d-flex pb-3 pl-5 ml-2 font-weight-bold"> <a href="/home">Home</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href="/docs-and-tools">Docs & Tools</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href="" style="color: #1abae9">Details</a> </div> 
54                                --> 
55                                <div class="slider-details d-flex align-items-center justify-content-center" style="background-image: url('/documents/20126/51018/Rectangle.png/e994fa0f-49e8-a3ca-d66a-51eb385cfafc?t=1547458674086'); background-size: cover; background-position: center;"> 
56                                    <div class="row slider-details-info d-flex flex-column justify-content-center text-center"> 
57                                        <#if fTitle?has_content> <h2 class="slider-title w-75">${fTitle}</h2> 
58                                        </#if> 
59                                        <#if fAttachment?has_content> 
60                                            <#-- take file version --> 
61                                                <#assign fileVersion = dlFileEntry.getFileVersion().version /> 
62 
63                                                <#assign currentDate=.now> 
64                                                    <#assign numberOfDays=30?long> 
65                                                        <#assign timeInMillisecond=(1000 * 60 * 60 * 24 * numberOfDays)> 
66                                                            <#if fileVersion !="1.0"> 
67                                                                 <#-- if file version is update --> 
68                                                                    <#if (currentDate?long - dlFileEntry.getModifiedDate()?long) lte timeInMillisecond> 
69                                                                        <div class="subtitle pb-3 align-self-center">  
70                                                                             <h5 class="mb-0 docsToolsFileInfo" style="color:white" >Updated on :${dlFileEntry.getModifiedDate()?string("dd/MM/yyyy")} <span class="badge badge-new-version p-2">New Version</span></h5> 
71                                                                        </div> 
72                                                                    <#else> 
73                                                                        <#--  no label "new version" --> 
74                                                                        <div class="subtitle pb-3 align-self-center">  
75                                                                             <h5 class="mb-0 docsToolsFileInfo" style="color:white" >Updated on :${dlFileEntry.getModifiedDate()?string("dd/MM/yyyy")}</h5> 
76                                                                        </div> 
77                                                                    </#if> 
78                                                           <#else> 
79                                                               <#-- if file version isn't update --> 
80                                                                     <#if (currentDate?long - dlFileEntry.getCreateDate()?long) lte timeInMillisecond> 
81                                                                          <div class="subtitle pb-3 align-self-center"> 
82                                                                              <h5 class="mb-0 docsToolsFileInfo" style="color:white"> Updated on : ${dlFileEntry.getModifiedDate()?string("dd/MM/yyyy")} <span class="badge badge-default-version p-2">New</span></h5> 
83                                                                          </div> 
84                                                                     <#else> 
85                                                                     <#--  no label "new version" --> 
86                                                                       <div class="subtitle pb-3 align-self-center">  
87                                                                             <h5 class="mb-0 docsToolsFileInfo" style="color:white" >Updated on :${dlFileEntry.getModifiedDate()?string("dd/MM/yyyy")}</h5> 
88                                                                        </div> 
89                                                                     </#if> 
90                                                            </#if> 
91                                                            
92 
93                                        </#if>  
94                                        <#if themeDisplay.getSiteGroup().getParentGroupId() != 0> 
95                                            <#assign url = themeDisplay.getURLCurrent()?substring(0, themeDisplay.getURLCurrent()?last_index_of("/docs-and-tools-details")) /> 
96                                            <a href="${url}/docs-and-tools">  
97                                        <#else> 
98                                            <a href="/docs-and-tools"> 
99                                        </#if> 
100 
101                                            <button type="button" class="btn bottone white" style="font-size: larger;">BACK TO ALL DOCS & TOOLS</button></a> 
102                                    </div> 
103                                </div> 
104                                <div class="row pt-5 d-flex align-items-center justify-content-center"> 
105                                    <div class="w-75"> 
106                                        <div class="row d-flex align-items-center justify-content-center"> 
107                                            <div class="col-md-4"> 
108                                                <#if imgUrl?has_content> <img src="${imgUrl}" /> </#if> 
109                                            </div> 
110                                            <div class="col-md-8"> 
111                                                <#if fDescription?has_content> 
112                                                    <div class="text">${fDescription}</div> 
113                                                </#if> 
114                                                <#if fAttachment?has_content>  
115                                                    <a href="${fileUrl}">  
116                                                        <button type="button" class="btn bottone">DOWNLOAD (${dlFileEntry.getExtension()?upper_case}, ${((dlFileEntry.getSize()/1024)/1024)?string["0.##"]} Mb)&nbsp;&nbsp; 
117                                                            <i class="glyphicon glyphicon-download-alt"></i> 
118                                                        </button>  
119                                                    </a>  
120                                                </#if> 
121                                                <#if file?has_content> 
122                                                    <a href="${fileUrlView}" target="_blank"> 
123                                                        <button class="btn bottone ml-4">                                                         
124                                                            VIEW  
125                                                        </button> 
126                                                    </a>  
127                                                </#if> 
128                                            </div> 
129                                        </div> 
130                                    </div> 
131                                </div> 
132                        </#if> 
133                        </div> 
134                        </div> 
135                        </div> 
136    </#if> 
137 
138 
139 
140 <style type="text/css"> 
141        .badge-new-version { 
142            background-color: #ffcc00; 
143            color: #003399; 
144            font-weight: 700; 
145            text-transform: uppercase; 
146
147 
148        .badge-default-version { 
149            background-color: #a0ddf9; 
150            color: #003399; 
151            font-weight: 700; 
152            text-transform: uppercase; 
153
154</style>