SIM Asset Publisher Portlet

Agrégateur de contenus

SIM Asset Publisher Portlet

Agrégateur de contenus

Une erreur s'est produite lors du traitement du gabarit.
Java method "com.sun.proxy.$Proxy82.getFileEntryByUuidAndGroupId(String, long)" threw an exception when invoked on com.sun.proxy.$Proxy82 object "com.liferay.document.library.internal.service.DLFileRankDLAppLocalServiceWrapper@4bb8d9e1"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign fileEntry = dlAppLocalService...  [in template "20101#20128#1371264" at line 117, column 25]
----
1<style> 
2    .no-style-img{ 
3        width:100% !important; 
4
5    .extra-style-oppoturnity{ 
6        border: 1px solid #dadada; 
7        box-shadow: 0 2px 4px 0 rgba(0,0,0,0.25);  
8        display: flex; display: -webkit-flex;  
9        display: -ms-flexbox;  
10        flex-basis: 25%;  
11        -webkit-flex-basis: 25%;  
12        -ms-flex-preferred-size: 25%;  
13        flex-flow: column nowrap;  
14        -webkit-flex-flow: column nowrap;  
15        -ms-flex-flow: column nowrap;  
16        flex-grow: 1;  
17        -webkit-flex-grow: 1;  
18        -ms-flex: 1;  
19        margin-bottom: 1em;  
20        padding: 1em; 
21
22     
23 
24     @media screen and (max-width: 1080px) { 
25         .extra-style-oppoturnity{ 
26                 -webkit-flex-basis: 45%;  
27
28
29 
30     
31</style> 
32<#if entries?has_content> 
33<h2 class="text-center">Where we serve</h2> 
34<div class="sim-opportunity-content-container"> 
35<div class="go-content-container tab-pane" style="display: -webkit-flex;-webkit-flex-flow:row wrap;-webkit-justify-content: space-between !important;justify-content: space-between;"> 
36 
37	 
38	    <#list entries as curEntry> 
39		<#assign tags = curEntry.tagNames /> 
40		<#if tags?seq_contains("country")> 
41		<#assign url = currentURL /> 
42                    	<#assign currentPageIndex = url?last_index_of("/") /> 
43                        <#assign mainArticle = url?substring(currentPageIndex) /> 
44                        <#assign currentPageIndex = mainArticle?index_of("?") /> 
45                        <#if (currentPageIndex > 0) > 
46                            <#assign mainArticle = mainArticle?substring(1,currentPageIndex) /> 
47                        </#if> 
48                        <#assign mainArticle = mainArticle?lower_case /> 
49		                <#assign assetRenderer = curEntry.getAssetRenderer() /> 
50                	    <#assign article = curEntry.getAssetRenderer().getArticle() /> 
51                	    <#assign articleKey = article.getResourcePrimKey() /> 
52                		<#assign docXml = saxReaderUtil.read(article.getContentByLocale(locale)) /> 
53                	    <#assign abstract = docXml.valueOf("//dynamic-element[@name='Small_Summary']/dynamic-content/text()") /> 
54                        <#assign selectedImage = docXml.valueOf("//dynamic-element[@name='Small_Image_URL']/dynamic-content/text()") /> 
55                        <#assign highlightMap = docXml.valueOf("//dynamic-element[@name='highlightMap']/dynamic-content/text()") /> 
56                        <#assign squareImage = docXml.valueOf("//dynamic-element[@name='thumbnailImage']/dynamic-content/text()") /> 
57                        <#assign title = docXml.valueOf("//dynamic-element[@name='name']/dynamic-content/text()") /> 
58                        <#assign region = docXml.valueOf("//dynamic-element[@name='Regions_Sel']/dynamic-content/text()") /> 
59                        <#-- PhuongNQ: Upgrade to 7.2  
60                        <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, '') > 
61                        --> 
62                        <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetRenderer, curEntry, true) /> 
63                        <#-- PhuongNQ: Upgrade to 7.2  
64                        <#assign articleURL = viewURL + '?countries=' + curEntry.getTitle(locale) + "&Regions_Sel=" + region /> 
65                        --> 
66                        <#assign articleURL = httpUtil.addParameter(viewURL, 'countries', curEntry.getTitle(locale)) /> 
67                        <#assign articleURL = httpUtil.addParameter(viewURL, 'Regions_Sel', region) /> 
68                        <#assign titleURL = article.urlTitle /> 
69                        <#if mainArticle != titleURL> 
70 
71                        <div class="card text-center d-none d-md-block" style="margin:1em;"> 
72						<div class="opportunity"> 
73                        <div class="opportunity-title"> 
74                        <p><img src="${selectedImage}" width="100%;" style="min-height:223px;" /></p> 
75                        <a href="${articleURL}"><h3 class="text-center">${title}</h3></a> 
76                        </div> 
77                        </div> 
78                        </div> 
79                        <div class="media d-none d-md-block card" style="width:100%;margin:0; padding: 5px 0; border-top:1px solid rgba(150,150,150,0.15);"> 
80                         
81                        <a href="${articleURL}" class="pull-left"><img src="${squareImage}" style="max-width:75px;"></a> 
82                         
83                        <div class="media-body"> 
84                        <a href="${articleURL}"><h4 class="media-heading">${title}</h4></a> 
85                        </div> 
86                        <a href="${articleURL}" class="pull-right" style="margin-left:auto"><img src="${highlightMap}" style="max-width:75px;"></a> 
87                        </div> 
88                        </#if> 
89		<#else> 
90		<#assign url = currentURL /> 
91                    	<#assign currentPageIndex = url?last_index_of("/") /> 
92                        <#assign mainArticle = url?substring(currentPageIndex) /> 
93                        <#assign currentPageIndex = mainArticle?index_of("?") /> 
94                        <#if (currentPageIndex > 0) > 
95                            <#assign mainArticle = mainArticle?substring(1,currentPageIndex) /> 
96                        </#if> 
97                        <#assign mainArticle = mainArticle?lower_case /> 
98                	    <#assign assetRenderer = curEntry.getAssetRenderer() /> 
99                	    <#assign article = curEntry.getAssetRenderer().getArticle() /> 
100                	    <#assign articleKey = article.getResourcePrimKey() /> 
101                		<#assign docXml = saxReaderUtil.read(article.getContentByLocale(locale)) /> 
102                        <#assign selectedImage = docXml.valueOf("//dynamic-element[@name='Small_Image_URL']/dynamic-content/text()") /> 
103                        <#assign squareImage = docXml.valueOf("//dynamic-element[@name='Square_Pic_URL']/dynamic-content/text()") /> 
104                        <#assign map = docXml.valueOf("//dynamic-element[@name='map']/dynamic-content/text()") /> 
105                        <#assign title = docXml.valueOf("//dynamic-element[@name='banner_text_content']/dynamic-content/text()") /> 
106                        <#-- PhuongNQ: Upgrade to 7.2  
107                        <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, '') > 
108                        --> 
109                        <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetRenderer, curEntry, true) /> 
110                        <#assign region = docXml.valueOf("//dynamic-element[@name='Regions_Sel']/dynamic-content/text()") /> 
111                        <#assign titleURL = article.urlTitle /> 
112                        <#if mainArticle != titleURL> 
113                        <#assign articleURL = httpUtil.addParameter(viewURL, 'Regions_Sel', region) /> 
114                        <#assign dlAppLocalServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService") /> 
115                        <#assign dlUtil = serviceLocator.findService("com.liferay.document.library.kernel.util.DLUtil") /> 
116                        <#assign jsonDlFileEntry = jsonFactoryUtil.createJSONObject(map) /> 
117                        <#assign fileEntry = dlAppLocalServiceUtil.getFileEntryByUuidAndGroupId( 
118                            jsonDlFileEntry.getString("uuid"), 
119                            jsonDlFileEntry.getString("groupId")?number) /> 
120                        <#assign mapURL = dlUtil.getDownloadURL(fileEntry, fileEntry.getLatestFileVersion(true), themeDisplay, "") /> 
121 
122                        <div class="opportunity-container d-none d-md-block extra-style-oppoturnity" style="margin:1em;"> 
123								<div class="opportunity"> 
124                        <div class="opportunity-title"> 
125                        <p><img src="${selectedImage}" width="100%" style="min-height:223px;" class="no-style-img" /></p> 
126                        <a href="${articleURL}"><h3 class="text-center">${title}</h3></a> 
127                        </div> 
128                        </div> 
129                        </div> 
130                        <div class="media d-md-none" style="width:100%; margin:0; padding: 5px 0; border-top:1px solid rgba(150,150,150,0.15);"> 
131                        <a href="${articleURL}" class="pull-left"><img src="${squareImage}" style="max-width:75px;margin-right:10px;"></a> 
132                        <div class="media-body mt-auto mb-auto"> 
133                        <a href="${articleURL}"><h4>${title}</h4></a> 
134                         
135                        </div> 
136                        <a href="${articleURL}" class="pull-right mt-auto mb-auto" style="margin-left:auto"><img src="${mapURL}" style="max-width:75px;"></a> 
137 
138                        </div> 
139                         
140                        </#if> 
141                        </#if> 
142		 
143		 
144		 
145 
146	</#list> 
147	<div class="d-md-none" style="width:100%; border-top:1px solid rgba(150,150,150,0.15);"></div> 
148	</div> 
149	</div> 
150</#if>