Le blog de la logistique et de la Supply Chain

Le blog de Mecalux est le média des professionnels de la logistique et de la Supply Chain. Nos articles vous aident à améliorer les conditions de travail et la productivité de votre entrepôt.

Une erreur s'est produite lors du traitement du gabarit.
Can't compare values of these types. Allowed comparisons are between two numbers, two strings, two dates, or two booleans.
Left hand operand is an extended_hash (HashMap wrapped into f.t.DefaultMapAdapter).
Right hand operand is a string (wrapper: f.t.SimpleScalar).
The blamed expression:
==> sections[0] != ''  [in template "20101#20128#3282439" at line 28, column 26]

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if sections[0] != ""  [in template "20101#20128#3282439" at line 28, column 21]
----
1<#assign className = "blog" /> 
2 
3<#if entries?has_content > 
4 
5    <#assign cdn = (mlxUrlUtilService.getCdn(groupId))!"" /> 
6 
7    <#--MKTG-1196: US Date format --> 
8    <#assign domain = themeDisplay.getPortalDomain() /> 
9    <#assign dateFormat = "dd MMM yyyy"/> 
10    <#if (domain?contains("us")) || (domain?contains("interlake")) > 
11        <#assign dateFormat = "MMMMMMMMM d, yyyy" /> 
12    </#if> 
13 
14	<div class="corporate--${className}--articles--container"> 
15	    <ul class="corporate--${className}--articles--list"> 
16		<#list entries as curEntry > 
17            <#assign article = mlxAssetHelperService.getJournalArticleByEntry(curEntry) /> 
18            <#assign articleUrl =  mlxUrlUtilService.getUrlByJournalArticle(article,"${locale}", groupId)?string /> 
19			<li class="corporate--${className}--articles--list-item"> 
20			    <#assign articleValues = mlxJournalHelperService.getStructureFieldValues(article, "${locale}") /> 
21                <#assign listSummaryArticle = (articleValues["list_summary"]?string)!"" /> 
22                <#if listSummaryArticle?has_content > 
23                    <#assign contentSummary = listSummaryArticle?truncate(200, ' ...') /> 
24                <#else> 
25                     
26                    <#assign sections = (articleValues["header"])!"" /> 
27 
28                    <#if sections[0] != ''> 
29                     
30                        <#if sections?has_content> 
31                            <#list sections as section > 
32                                <#assign paragraphs = section.paragraph_title.getSiblings() /> 
33                                <#list paragraphs as paragraph > 
34                                    <#assign paragraphText = paragraph.paragraph.getData() /> 
35                                    <#if paragraphText?has_content > 
36                                        <#break> 
37                                    </#if> 
38                                </#list> 
39                                <#if paragraphText?has_content > 
40                                    <#break> 
41                                </#if> 
42                            </#list> 
43                             
44                            <#assign contentSummary = paragraphText?truncate(200, '...') /> 
45                             
46                        </#if> 
47                         
48                    </#if> 
49                     
50                    <#assign contentSummary = "" /> 
51 
52                </#if> 
53 
54                <#assign contentSummary = contentSummary?replace("</?[^>]+/?>", "" , 'r') /> 
55 
56                <#assign master = mlxMastersHelperService.getMasterNameByJournalArticle(article) /> 
57 
58                <#assign titlealt = (mlxExpandoService.getExpandoValueForClass("com.liferay.document.library.kernel.model.DLFileEntry","mlxDocumentTitle",listImageFileEntry.getFileVersion().getFileVersionId()).getString(locale))!"" /> 
59    			<#assign image = (articleValues["list_image"])!"{}" /> 
60                <#assign imageJSON = jsonFactoryUtil.createJSONObject(image) /> 
61                <#assign imageUUID = imageJSON.getString("uuid") /> 
62				<#assign articleImageUrl = mlxDocumentsHelperService.getDocumentUrlFromUUID(imageUUID, locale) /> 
63 
64 
65                <article class="corporate--blog--articles--item"> 
66                    <a href="${articleUrl}" class="corporate--blog--articles--item-link" data-track-event-category="H_Post_Body" data-track-event-label="|Blog|Detail|${master}"> 
67                        <figure class="corporate--blog--articles--item-figure"> 
68                            ${corporate.img(cdn+articleImageUrl, true, 'alt="' + titlealt + '"', 'title="' + titlealt + '"', 'class="corporate--blog--articles--item-image"')} 
69                        </figure> 
70                        <h2 class="corporate--blog--articles--item-heading"> 
71                            <#assign nameArticle = (articleValues["name"]?string)!"" /> 
72                            ${nameArticle} 
73                        </h2> 
74                    </a> 
75                    <span class="corporate--blog--articles--item-date"> 
76                        <#assign public_date_Data = (articleValues["public_date"]?date["yyyy-MM-dd"]?long)!0  /> 
77 
78                        <#if (public_date_Data > 0) > 
79                            <#assign public_date_DateObj = dateUtil.newDate(public_date_Data) /> 
80			                <#assign publicDate = dateUtil.getDate(public_date_DateObj, dateFormat, locale, timeZoneUtil.getTimeZone("UTC")) /> 
81                            ${publicDate!} 
82                        </#if> 
83                    </span> 
84                    <p class="corporate--blog--articles--item-content">${contentSummary}</p> 
85                </article> 
86			</li> 
87		</#list> 
88		</ul> 
89	</div> 
90</#if>