Service de la sécurité civile et militaire
Nous assurons la sécurité et la protection de la population et préservons ses bases d'existence par les moyens civils (feu/PCi/EM de conduite) et la contribution à la préparation des moyens militaires.

Actualités
Une erreur s'est produite lors du traitement du modèle.
Java method "jdk.proxy4.$Proxy190.getFileEntryByUuidAndGroupId(String, long)" threw an exception when invoked on jdk.proxy4.$Proxy190 object "com.liferay.document.library.internal.service.FriendlyURLDLFileEntryLocalServiceWrapper@28aebd25"; see cause exception in the Java stack trace.
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign imageFileEntry = dlFileEntryL... [in template "10155#10193#14104459" in function "findImageFileEntryByJournalArticle" at line 184, column 33]
- Reached through: @listItem entry [in template "10155#10193#14104459" at line 45, column 33]
---- 1<style> 2.image-container { 3 width: 100%; 4 aspect-ratio: 3 / 2; /* Maintain 3:2 aspect ratio */ 5 overflow: hidden; 6 position: relative; 7} 8 9.image-fit { 10 width: 100%; 11 /* height: 100%;*/ 12 object-fit: cover; /* Ensures the image fills the container without distortion */ 13 position: absolute; 14 top: 0; 15 left: 0; 16} 17.image-cursor-pointer{ 18 cursor: pointer; 19} 20.min-height-45 { 21 min-height: 4.5rem; 22} 23</style> 24 25 26<#-- Import JSONFactoryUtil to parse the JSON string --> 27<#assign jsonFactoryUtil = staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"]> 28<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 29<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 30<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")> 31<#assign assetVocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyService")> 32 33 34 35<#setting url_escaping_charset='ISO-8859-1'> 36 <#assign backLink = currentURL?url/> 37 38 39 40 41<div> 42 <#if entries?has_content> 43 <ul class="list-unstyled d-flex flex-wrap justify-content-between"> 44 <#list entries as entry> 45 <@listItem entry /> 46 </#list> 47 </ul> 48 </#if> 49</div> 50 51 52<#macro listItem entry> 53 54 <li class="col-12 /*col-sm-6*/ col-md-6 col-lg-6 col-xl-4 d-flex "> 55 56 57 <#assign renderer = entry.getAssetRenderer() /> 58 <#assign className = renderer.getClassName() /> 59 <#if className == "com.liferay.journal.model.JournalArticle" && renderer.getArticle()?? > 60 <#assign journalArticle = renderer.getArticle() /> 61 <#assign viewURL = "/web/communication/detail?groupId=${entry.getGroupId()}&articleId=${journalArticle.getArticleId()}&redirect=${backLink}" /> 62 63 64 65 66 67 <#assign imageFileEntry = findImageFileEntryByArticle(journalArticle) /> 68 <#assign strCategories = ""> 69 <#assign typologie = "" /> 70 71 <#assign categoryList = article.getCategories() /> 72 <#list categoryList as category> 73 <#assign vocabulary = assetVocabularyService.getVocabulary(category.vocabularyId)> 74 <#if vocabulary.name = "020 Typologies"> 75 <#if category.getTitle(locale) != "News-Accueil"> 76 <#assign typologie= category.getTitle(locale) /> 77 </#if> 78 </#if> 79 <#if vocabulary.name = "010 Pouvoirs"> 80 <#assign strCategories = category.getDescription(locale) /> 81 </#if> 82 <#if vocabulary.name = "News ICT VS"> 83 <#assign strCategories = strCategories + "#" +category.getTitle(locale)+" " /> 84 </#if> 85 </#list> 86 87 88 <article class="position-relative mb-4 bg-light w-100"> 89 90 <#--<article class="d-flex flex-row flex-nowrap position-relative mb-4">--> 91 92 93 94 <header class="p-3 bg-light w-100"> 95 <div class="d-flex justify-content-between text-muted small"> 96 <p class="mb-0">${typologie}</p> 97 <time datetime="${ja.getDisplayDate()?datetime?string("yyyy-MM-dd")}"> 98 ${ja.getDisplayDate()?datetime?string("dd.MM.yyyy")} 99 </time> 100 </div> 101 <p class="text-vs-red">${strCategories}</p> 102 <h3 class="min-height-45"> 103 <a href="${viewURL}" class="font-weight-bolder text-vs-black stretched-link"> 104 ${entry.getTitle(locale)} 105 </a> 106 </h3> 107 108 109 <#attempt> 110 <#if journalArticle.isSmallImage()> 111 112 <#elseif entry.getDescription(locale)?trim != "" && !imageFileEntry?has_content> 113 <div class=""> 114 ${entry.getSummary(locale)} 115 </div> 116 117 </#if> 118 <#recover> 119 </#attempt> 120 121 122 123 124 125 126 </header> 127 128 <#if imageFileEntry?has_content> 129 <figure class="image-container mb-0 w-100"> 130 <@displayImage imageFileEntry /> 131 </figure> 132 <#elseif journalArticle?? > 133 <#attempt> 134 <#if journalArticle.isSmallImage()> 135 <#assign thumbnailUrl=journalArticle.getSmallImageURL() /> 136 <figure class="image-container mb-0 w-100"> 137 <img class="image-fit image-cursor-pointer" src="${thumbnailUrl}" alt="Thumbnail"> 138 <figure class="image-container"> 139 </#if> 140 <#recover> 141 142 </#attempt> 143 </#if> 144 </article> 145 146 </li> 147 </#if> 148</#macro> 149 150<!-- Fonction pour rechercher l'image --> 151<#function findImageFileEntryByArticle journalArticle> 152 <#assign imageFileEntry = ""?default("") /> 153 <#assign ja = journalArticle /> 154 <#if ja?exists && ja?has_content> 155 <#assign imageFileEntry = findImageFileEntryByJournalArticle(ja) /> 156 </#if> 157 <#return imageFileEntry /> 158</#function> 159 160 161 162<#function findImageFileEntryByJournalArticle ja> 163 164 <#assign imageFileEntry = ""?default("nix") /> 165 <#if ja?exists && ja?has_content> 166 <#assign article = AssetEntryLocalService.fetchEntry("com.liferay.journal.model.JournalArticle", ja.resourcePrimKey) /> 167 <#assign ddmFormValuesReader = article.getAssetRenderer().getDDMFormValuesReader()> 168 <#assign ddmFormValues = ddmFormValuesReader.getDDMFormValues()> 169 <#assign ddmFormFieldValuesMap = ddmFormValues.getDDMFormFieldValues() > 170 <#if ddmFormFieldValuesMap?has_content> 171 <#list ddmFormFieldValuesMap as fmval> 172 <#assign val = fmval.getValue()> 173 <#assign name = fmval.getName()> 174 <#if val?exists && val?has_content> 175 <!-- Com & media --> 176 <#if name == "Image"> 177 <#assign data = val.getString(locale)?default("false")> 178 <#if data != "false"> 179 <#assign jsonObject = jsonFactoryUtil.createJSONObject(data)> 180 <#assign groupIdString = jsonObject.getString("groupId")!"0" /> 181 <#if groupIdString?has_content> 182 <#assign imageGroupId = jsonObject.getString("groupId")?number?long /> 183 <#assign imageUuid = jsonObject.getString("uuid") /> 184 <#assign imageFileEntry = dlFileEntryLocalService.getFileEntryByUuidAndGroupId(imageUuid, imageGroupId) /> 185 </#if> 186 </#if> 187 </#if> 188 <!-- Newsfeed --> 189 <#if name == "ImageFieldSet"> 190 <#assign nestedFields = fmval.getNestedDDMFormFieldValues()> 191 <#if nestedFields?has_content> 192 <#list nestedFields as nestedField> 193 <#assign nestedVal = nestedField.getValue()> 194 <#assign nestedName = nestedField.getName()> 195 <#if nestedVal?exists && nestedVal?has_content> 196 <#assign nestedData = nestedVal.getString(locale)?default("No data available")> 197 <#if nestedName == "Image"> 198 199 200 <#if nestedName == "Image"> 201 <#attempt> 202 <#assign imageObject = nestedData?eval> 203 <#if imageObject?? && imageObject.fileEntryId??> 204 <#assign imageGroupId = imageObject.groupId?number?long /> 205 <#assign imageFileEntry = dlFileEntryLocalService.getFileEntryByUuidAndGroupId(imageObject.uuid, imageGroupId) /> 206 </#if> 207 <#recover> 208 </#attempt> 209 </#if> 210 211 212 213 214 215 </#if> 216 </#if> 217 </#list> 218 </#if> 219 </#if> 220 </#if> 221 </#list> 222 </#if> 223 </#if> 224 <#return imageFileEntry /> 225</#function> 226 227 228 229 230<#macro displayImage imageFileEntry> 231 <#if imageFileEntry?has_content> 232 <#assign imageUrl = "/documents/" + imageFileEntry.getGroupId() + "/" + imageFileEntry.getUuid() /> 233 <#assign latestFileVersion = imageFileEntry.getLatestFileVersion(true) /> 234 <picture data-fileentryid="${imageFileEntry.getFileEntryId()}"> 235 <source srcset="${themeDisplay.getPortalURL()}/o/adaptive-media/image/${imageFileEntry.getFileEntryId()}/Preview-1000x0/${imageFileEntry.getFileName()}" /> 236 <img class="image-fit image-cursor-pointer" alt="Foo alt-image description" data-fileentryid="${imageFileEntry.getFileEntryId()}" src="${imageUrl}" /> 237 </picture> 238 </#if> 239</#macro> Affichage des résultats 70 - 72 parmi 193.
Informations supplémentaires
Contact
Service de la sécurité civile et militaire
Rue des Casernes 40
CP 669
1950 Sion
CP 669
1950 Sion
Contact médias
Contact pour les médias
Rue des Casernes 40
1950 Sion
1950 Sion
