Agrégateur de contenus

Une erreur s'est produite lors du traitement du modèle.
The following has evaluated to null or missing:
==> serviceLocator.findService("com.liferay.document.library.kernel.util.DLUtil")  [in template "20097#20123#37789" at line 1, column 19]

----
Tip: If the failing expression is known to 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: dlUtil = serviceLocator.findService("...  [in template "20097#20123#37789" at line 1, column 10]
----
1<#assign dlUtil = serviceLocator.findService("com.liferay.document.library.kernel.util.DLUtil") 
2    dlAppLocalService=serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService") 
3    assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
4<#assign section = themeDisplay.getLayout().getFriendlyURL() 
5    sectionUrl = "/group/campus-angelini/wall" 
6    campusName = "angelini" /> 
7 
8<#if section?contains("pediatria")> 
9    <#assign campusName = "pediatria" /> 
10<#elseif section?contains("ortopedia")> 
11    <#assign campusName = "ortopedia" /> 
12<#elseif section?contains("psichiatria")> 
13    <#assign campusName = "psichiatria" /> 
14</#if> 
15<#if campusName != "angelini"> 
16     <#assign sectionUrl = sectionUrl + "-" + campusName /> 
17</#if> 
18<div class="sec sec-page"> 
19	<div class="sec-hd"> 
20		<div class="sec-hd-content"> 
21			<p class="sec-breadcrumb"><a href="${sectionUrl}">Campus ${campusName?capitalize}</a></p> 
22			<h1 class="sec-title"> 
23				${themeDisplay.getLayout().getName(themeDisplay.getLocale())?capitalize} 
24			</h1> 
25			<#--<div class="sec-summary"> 
26				<p>Visualizza tutti gli articoli del Campus generale</p> 
27			</div>--> 
28		</div><!-- /sec-hd-content --> 
29	</div> 
30</div> 
31 
32<div class="sec sec-archivio"> 
33    <div class="sec-bd"> 
34    <div class="c-list c-list-articles"> 
35    <ul class="list list-articles"> 
36    <#if entries?has_content> 
37        <#list entries as entry > 
38        <#assign renderer = entry.getAssetRenderer() 
39            className = renderer.getClassName() /> 
40                 
41            <#if className == "com.liferay.journal.model.JournalArticle"> 
42                <#assign journalArticle = renderer.getArticle() 
43                    document = saxReaderUtil.read(journalArticle.getContent()) 
44                    rootElement = document.getRootElement() 
45            		createDate = dateUtil.getDate(entry.publishDate, "dd/MM/yyyy", locale) 
46                    xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='ABSTRACT']") 
47                    subTitle = xPathSelector.selectSingleNode(rootElement).getStringValue() 
48                    link = renderer.getURLViewInContext(renderRequest, renderResponse, '')  
49        			asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', journalArticle.resourcePrimKey) 
50                    cssClass = "" /> 
51                 
52                <#--    SEZIONE CAMPUS     --> 
53                <#list asset.getTags() as tag> 
54                <#if tag.name?contains("psichiatria") > 
55                    <#if cssClass == "" > 
56                        <#assign cssClass = "psichiatria" /> 
57                    <#elseif cssClass != "psichiatria"> 
58                        <#assign cssClass = "" /> 
59                        <#break> 
60                    </#if> 
61                <#elseif tag.name?contains("pediatria")> 
62                    <#if cssClass == "" > 
63                        <#assign cssClass = "pediatria" /> 
64                    <#elseif cssClass != "pediatria"> 
65                        <#assign cssClass = "" /> 
66                        <#break> 
67                    </#if> 
68                <#elseif tag.name?contains("ortopedia")> 
69                    <#if cssClass == "" > 
70                        <#assign cssClass = "ortopedia" /> 
71                    <#elseif cssClass != "ortopedia"> 
72                        <#assign cssClass = "" /> 
73                        <#break> 
74                    </#if> 
75                </#if> 
76                </#list> 
77                 
78                <#assign titoloXmlElement = rootElement.selectSingleNode("dynamic-element[@name='TITOLO']") 
79                    titolo = titoloXmlElement.selectSingleNode("dynamic-content").getText() /> 
80         
81                <#if titoloXmlElement.selectNodes("dynamic-element")?size gt 0 >            
82                    <#assign immagineFileEntry = titoloXmlElement.selectSingleNode("dynamic-element[@name='IMMAGINE']/dynamic-content").getText() 
83                        abstract = titoloXmlElement.selectSingleNode("dynamic-element[@name='ABSTRACT']/dynamic-content").getText() /> 
84                <#else> 
85                    <#assign immagineFileEntry = rootElement.selectSingleNode("dynamic-element[@name='IMMAGINE']/dynamic-content").getText() 
86                        abstract = rootElement.selectSingleNode("dynamic-element[@name='ABSTRACT']/dynamic-content").getText() /> 
87                </#if> 
88                <#assign titoloLink = entry.getTitle(locale) 
89                    immagineJson = jsonFactoryUtil.createJSONObject(immagineFileEntry) 
90                    fileEntry = dlAppLocalService.getFileEntry(immagineJson.fileEntryId?number) 
91                    immagine=dlUtil.getDownloadURL(fileEntry, fileEntry.getLatestFileVersion(), themeDisplay, "") 
92                    thumb=dlUtil.getThumbnailSrc(fileEntry, fileEntry.getLatestFileVersion(), themeDisplay) /> 
93                     
94                <li class="item item-article item-c-${cssClass}"> 
95                    <div class="media"> 
96                        <#if immagine?has_content> 
97                            <div class="media-fig"> 
98                                <div class="fig"> 
99                                    <picture> 
100    								<!-- 1387 x 587 --> 
101    								<source media="(min-width: 768px)" sizes="1387px" srcset="${immagine}"> 
102    								<!-- 440 x 186 --> 
103    								<source media="(max-width: 767px)" sizes="440px" srcset="${immagine}"> 
104    								<!-- 440 x 186 (default - thumb) --> 
105    								<img src="${thumb}" alt="${titoloLink}" width="440" height="186" loading="lazy" /> 
106							        </picture> 
107                                </div> 
108                            </div> 
109                        </#if> 
110                        <div class="media-txt"> 
111                            <p class="item-meta"> 
112                                <em class="datepub">${createDate}</em> 
113                                    &ndash;&nbsp;<span class="item-category">Articoli Medico Specialistici</span> 
114                                <#if entry.getCategories()?size gt 0 > 
115                                    &ndash; 
116                                    <#list entry.getCategories() as categoria> 
117                                        <span class="item-category"> 
118                                            ${categoria.name} 
119                                            <#if velocityCount lt entry.getCategories()?size()> 
120
121                                            </#if> 
122                                        </span> 
123                                    </#list> 
124                                </#if> 
125                            </p>                                                                       
126                            <#if titolo?has_content> 
127                                <h3 class="item-title"><a class="media-link" href="${link}">${titoloLink}</a></h3> 
128                            </#if> 
129                                 
130                            <#if abstract?has_content> 
131                                ${subTitle} 
132                            </#if> 
133                        </div><!-- /media-txt --> 
134                    </div><!-- /media --> 
135                </li><!-- /item-article --> 
136            </#if> 
137        </#list> 
138        <#else> 
139        <li class="item item-article"> 
140            <div class="media"> 
141                <div class="media-txt"> 
142                    <h3 class="item-title">Non ci sono articoli in questa sezione</h3> 
143                </div> 
144            </div> 
145        </li> 
146        </#if> 
147        </ul><!-- /list --> 
148    </div><!-- /c-list --> 
149    </div><!-- /sec-bd --> 
150</div> 

Ti potrebbe interessare anche...