Notícia na íntegra

Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing:
==> imageDescription  [in template "20095#20121#NOTICIA-EM-DESTAQUE" at line 30, column 37]

----
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: ${imageDescription}  [in template "20095#20121#NOTICIA-EM-DESTAQUE" at line 30, column 35]
----
1<#assign prefix = 'psp' /> 
2<#assign articleId = .vars['reserved-article-id'].data /> 
3<#assign title = title???then(title.getData(), .vars["reserved-article-title"].data) /> 
4<#assign categories = restClient.get('/headless-delivery/v1.0/sites/' + groupId + '/structured-contents/by-key/' + articleId + '?fields=taxonomyCategoryBriefs')![] /> 
5<#assign isVideo = youtubeLink?? && youtubeLink?has_content /> 
6 
7<#assign imageUrl = (image?? && image.getData()?has_content)?then(image.getData(), '') /> 
8<#if imageUrl?has_content> 
9    <#assign imageFileEntryId = image.getAttribute("fileEntryId") /> 
10    <#assign imageDescription = image.getAttribute('alt')?has_content?then(image.getAttribute('alt'), 'Imagem de notícia') /> 
11</#if> 
12 
13<#if !isVideo> <#-- Is News --> 
14 
15    <#assign description = description.getData()?truncate(150, '...') > 
16 
17    <#macro categoriesMarkup prefix categories> 
18        <#list categories as key, value> 
19            <#list value as category> 
20                <span class="${prefix}-badge text-2 font-weight-semi-bold font-base"> 
21                    ${category.taxonomyCategoryName} 
22                </span> 
23            </#list> 
24        </#list> 
25    </#macro> 
26 
27    <a class="${prefix}-highlighted-new ${prefix}-highlighted-new--${articleId}" href="${friendlyURL}"> 
28        <div class="${prefix}-image-container ${prefix}-image-container--highlighted-new"> 
29            <span class="sr-only">${imageDescription}</span> 
30             
31            <#if imageUrl?has_content> 
32            <img class="${prefix}-image-container__image" src="${imageUrl}" data-fileentryid="${imageFileEntryId}" alt="${imageDescription}" loading="lazy" /> 
33            </#if> 
34 
35            <div class="${prefix}-image-container__content justify-content-end pt-3 pt-md-4"> 
36                 
37                <div class="p-4 p-lg-5" style="background: var(--color-transparent-dark);"> 
38                 
39                    <div class="${prefix}-badge__container"> 
40                        <@categoriesMarkup prefix categories /> 
41                    </div> 
42                     
43                    <div class="pl-1 pl-md-2 mt-auto "> 
44                        <p class="${prefix}-highlighted-new__title mb-1 mb-md-2 font-base"> 
45                            ${title} 
46                        </p> 
47                         
48                        <p class="${prefix}-highlighted-new__description mb-0 pb-md-2 font-base"> 
49                            ${description} 
50                        </p> 
51                    </div> 
52 
53                </div> 
54            </div> 
55        </div> 
56    </a> 
57 
58<#else> <#-- Is Video --> 
59 
60    <#function extractYouTubeID url> 
61        <#local videoID = ""> 
62        <#if url?matches("https?://www\\.youtube\\.com/watch\\?v=[^&]+(&.*)?")> 
63            <#local videoID = url?split("=")[1]?split("&")[0]> 
64        <#elseif url?matches("https?://youtu\\.be/[^&]+")> 
65            <#local videoID = url?split("/")[3]> 
66        <#elseif url?matches("https?://www\\.youtube\\.com/embed/[^&]+")> 
67            <#local videoID = url?split("/")[4]> 
68        </#if> 
69        <#return videoID> 
70    </#function> 
71 
72    <#assign youtubeVideoId = (youtubeLink.getData()?length == 11)?then(youtubeLink.getData(), extractYouTubeID(youtubeLink.getData())) /> 
73 
74    <div class="${prefix}-highlighted-new ${prefix}-highlighted-new--${articleId}"> 
75        <div class="${prefix}-image-container ${prefix}-image-container--highlighted-new"> 
76 
77            <#if imageUrl?has_content> 
78                <img class="${prefix}-image-container__image" src="${imageUrl}" data-fileentryid="${imageFileEntryId}" alt="${imageDescription}" loading="lazy" /> 
79            <#else> 
80                <img class="${prefix}-image-container__image" src="https://img.youtube.com/vi/${youtubeVideoId}/sddefault.jpg" alt="Video image" loading="lazy" /> 
81            </#if> 
82 
83 
84            <div class="${prefix}-image-container__content justify-content-end"> 
85                <a title="Executar vídeo" id="video-play-button-${randomNamespace}" href="#" onclick="event.preventDefault(); playVideo${randomNamespace}()" class="position-absolute top-0 left-0 w-100 h-100 d-flex align-items-center justify-content-center z-index-1" style="background-color: rgba(0,0,0,0.35)"> 
86                    <span class="sr-only">Executar vídeo</span> 
87                    <svg class="d-none d-md-block" fill="#FFFFFF" height="160" width="160" version="1.1" id="Play" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 60 60" xml:space="preserve"><g id="bg" stroke-width="0"></g><g id="tracer" stroke-linecap="round" stroke-linejoin="round"></g><g id="icon"> <g> <path d="M45.563,29.174l-22-15c-0.307-0.208-0.703-0.231-1.031-0.058C22.205,14.289,22,14.629,22,15v30 c0,0.371,0.205,0.711,0.533,0.884C22.679,45.962,22.84,46,23,46c0.197,0,0.394-0.059,0.563-0.174l22-15 C45.836,30.64,46,30.331,46,30S45.836,29.36,45.563,29.174z M24,43.107V16.893L43.225,30L24,43.107z"></path> <path d="M30,0C13.458,0,0,13.458,0,30s13.458,30,30,30s30-13.458,30-30S46.542,0,30,0z M30,58C14.561,58,2,45.439,2,30 S14.561,2,30,2s28,12.561,28,28S45.439,58,30,58z"></path> </g> </g></svg> 
88                    <svg class="d-md-none" fill="#FFFFFF" height="60" width="60" version="1.1" id="Play" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 60 60" xml:space="preserve"><g id="bg" stroke-width="0"></g><g id="tracer" stroke-linecap="round" stroke-linejoin="round"></g><g id="icon"> <g> <path d="M45.563,29.174l-22-15c-0.307-0.208-0.703-0.231-1.031-0.058C22.205,14.289,22,14.629,22,15v30 c0,0.371,0.205,0.711,0.533,0.884C22.679,45.962,22.84,46,23,46c0.197,0,0.394-0.059,0.563-0.174l22-15 C45.836,30.64,46,30.331,46,30S45.836,29.36,45.563,29.174z M24,43.107V16.893L43.225,30L24,43.107z"></path> <path d="M30,0C13.458,0,0,13.458,0,30s13.458,30,30,30s30-13.458,30-30S46.542,0,30,0z M30,58C14.561,58,2,45.439,2,30 S14.561,2,30,2s28,12.561,28,28S45.439,58,30,58z"></path> </g> </g></svg> 
89                </a> 
90 
91                <iframe id="iframe-video-${randomNamespace}" class="d-none border-none w-100 h-100" data-src="https://www.youtube-nocookie.com/embed/${youtubeVideoId}?controls=0&autoplay=1" title="Vídeo - ${title}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> 
92                 
93                <div id="video-title-${randomNamespace}" class="p-4 p-lg-5 z-index-1" style="background: var(--color-transparent-dark);"> 
94                     
95                    <div></div> 
96                    <div class="pl-1 pl-md-2 mt-auto"> 
97                        <p class="${prefix}-highlighted-new__title mb-1 mb-md-2 font-base"> 
98                            ${title} 
99                        </p> 
100                    </div> 
101 
102                </div> 
103 
104            </div> 
105        </div> 
106    </div> 
107 
108 
109    <script> 
110 
111        function playVideo${randomNamespace}() { 
112            let swiper = document.querySelector(".psp-news-highlighter > .swiper").swiper; 
113            let $iframe = document.getElementById('iframe-video-${randomNamespace}'); 
114            let $title = document.getElementById('video-title-${randomNamespace}'); 
115            let $playButton = document.getElementById('video-play-button-${randomNamespace}'); 
116             
117            $title.classList.add('d-none'); 
118            $iframe.classList.remove('d-none'); 
119            $iframe.setAttribute('src', $iframe.getAttribute('data-src')) 
120             
121            $playButton.classList.add('d-none'); 
122            $playButton.classList.remove('d-flex'); 
123 
124            swiper.autoplay.stop();             
125            swiper.on('slideChange', stopVideo${randomNamespace}); 
126 
127
128 
129        function stopVideo${randomNamespace}() { 
130            let swiper = document.querySelector(".psp-news-highlighter > .swiper").swiper; 
131            let $iframe = document.getElementById('iframe-video-${randomNamespace}'); 
132            let $title = document.getElementById('video-title-${randomNamespace}'); 
133            let $playButton = document.getElementById('video-play-button-${randomNamespace}'); 
134             
135            $title.classList.remove('d-none'); 
136            $iframe.classList.add('d-none'); 
137            $iframe.setAttribute('src', '') 
138             
139            $playButton.classList.remove('d-none'); 
140            $playButton.classList.add('d-flex'); 
141             
142            swiper.autoplay.start(); 
143            swiper.on('slideChange', function() {}); 
144 
145
146 
147     
148    </script> 
149 
150</#if> 

SECOM - Prefeitura da Cidade de São Paulo
E-mail:
  imprensa@prefeitura.sp.gov.br
Sala de imprensa:  imprensa.prefeitura.sp.gov.br
Facebook I  Twitter I  Instagram I  TikTok I  YouTube I  Acervo de Vídeos I  LinkedIn