An error occurred while processing the template.
Java method "com.liferay.portal.kernel.util.DateUtil_IW.parseDate(String, String, Locale)" threw an exception when invoked on com.liferay.portal.kernel.util.DateUtil_IW object "com.liferay.portal.kernel.util.DateUtil_IW@73caaf6f"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign displayDate = dateUtil.parseD...  [in template "57149678738875#20119#8656433" at line 10, column 1]
----
1<#-- SERVIÇOS --> 
2<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
3<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
4 
5<#-- VARIÁVEIS --> 
6<#assign groupId = themeDisplay.getCompanyGroupId()  /> 
7<#assign currentArticle = JournalArticleLocalService.getArticle(articleGroupId, .vars['reserved-article-id'].data) /> 
8<#assign classPK = currentArticle.getResourcePrimKey() /> 
9<#assign categories = AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", classPK) /> 
10<#assign displayDate = dateUtil.parseDate("EEE, d MMM yyyy HH:mm:ss Z", .vars['reserved-article-create-date'].data, locale)?string("dd/MM/yyyy ' às ' HH'h'mm") /> 
11<#assign modifiedDate = dateUtil.parseDate("EEE, d MMM yyyy HH:mm:ss Z", .vars['reserved-article-modified-date'].data, locale)?string("dd/MM/yyyy ' às ' HH'h'mm") /> 
12<#assign images = news_images.getSiblings()?filter(imagem -> (imagem.getData())?? && imagem.getData() != "") /> 
13<#assign viewFullURL = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() /> 
14<#assign hasArquivados = false /> 
15 
16<div class="noticia-gdf row"> 
17<#assign fromCategoryPage = .vars['fromCategoryPage']?default('false') == 'true' /> 
18 
19<#assign categories = AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", classPK) /> 
20 
21<#-- Verifique se a categoria "Arquivados" está presente --> 
22<#assign hasArquivados = false /> 
23<#list categories as category> 
24    <#if category.getName()?lower_case == "arquivados"> 
25        <#assign hasArquivados = true /> 
26    </#if> 
27</#list> 
28 
29<#-- Exibe a categoria "Arquivados" apenas se a página de origem contiver '/category/' --> 
30<#if hasArquivados> 
31    <span data-category-url="/web/guest/category/arquivados"  
32          id="journalCategory"  
33          data-category-name="Arquivados"></span> 
34<#else> 
35    <#-- Se não tiver "Arquivados" ou não for uma página de categoria, exibe as demais categorias --> 
36    <#list categories as category> 
37        <#assign vocabulary = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService").getVocabulary(category.getVocabularyId()) /> 
38 
39        <#assign categoryUrlMapping = { 
40            "noticia": "noticias", 
41            "destaque": "modulo-carrossel-de-destaques-principais", 
42            "Serviços para o beneficiário": "servicos-para-o-beneficiario-2", 
43            "Perfil dos Diretores": "/o-iprev/perfil-dos-diretores", 
44            "MODULO-15-BOTOES": "servicos-mais-procurados" 
45        } /> 
46 
47        <#assign urlPrefix = "/web/guest/category/" /> 
48 
49        <#assign categoryUrl = urlPrefix + (categoryUrlMapping[category.getName()?lower_case]!category.getName()?lower_case?replace(' ', '-')) /> 
50 
51        <span data-category-url="${categoryUrl}"  
52              id="journalCategory"  
53              data-category-id="${category.getCategoryId()}"  
54              data-category-name="${category.getName()}"></span> 
55    </#list> 
56</#if> 
57 
58<div class="container"> 
59<div class="col-md-9 col-md-offset-1"> 
60    <span class="time-text">${displayDate} - Atualizado em ${modifiedDate}</span> 
61    <h3>${.vars['reserved-article-title'].data}</h3> 
62 
63    <#if !getterUtil.getBoolean(networks_share.getData())> 
64        <p class="compartilhar">COMPARTILHAR</p> 
65        <@share /> 
66    </#if> 
67 
68    <#if author.getData()?has_content> 
69        <p class="autor-text">${author.getData()}</p> 
70    </#if> 
71 
72    <#if images?has_content> 
73        <#if images?size == 1> 
74            <#list images as cur_news_image> 
75                <#if cur_news_image.getData()?? && cur_news_image.getData() != ""> 
76                    <img class="d-block w-100" src="${cur_news_image.getData()}" /> 
77                    <#if cur_news_image.attributes.alt??> 
78                        <p class="text-center mt-2 mb-5"><em>${cur_news_image.attributes.alt}</em></p>     
79                    </#if> 
80                </#if> 
81            </#list> 
82        <#else> 
83            <div id="carousel-${randomNamespace}" class="carousel slide mb-4" data-ride="carousel" data-interval="false"> 
84                <div class="carousel-inner"> 
85                    <#list images as cur_news_image> 
86                        <div class="carousel-item ${cur_news_image?is_first?then('active', '')}"> 
87                            <img class="d-block w-100" src="${cur_news_image.getData()}" /> 
88                            <#if cur_news_image.attributes.alt??> 
89                                <p class="text-center mt-2 mb-5"><em>${cur_news_image.attributes.alt}</em></p>     
90                            </#if> 
91                        </div> 
92                    </#list> 
93                </div> 
94                <a class="carousel-control-prev" href="#carousel-${randomNamespace}" role="button" data-slide="prev"> 
95                    <span class="carousel-control-prev-icon" aria-hidden="true"></span> 
96                    <span class="sr-only">Previous</span> 
97                </a> 
98                <a class="carousel-control-next" href="#carousel-${randomNamespace}" role="button" data-slide="next"> 
99                    <span class="carousel-control-next-icon" aria-hidden="true"></span> 
100                    <span class="sr-only">Next</span> 
101                </a> 
102            </div> 
103        </#if> 
104    </#if> 
105 
106 
107    <div class="materia">${content.getData()}</div> 
108 
109    <#if news_documents.getSiblings()?has_content && news_documents.getSiblings()?first.getData() != ""> 
110        <h4 class="mt-4">Anexos</h4> 
111        <ul class="list-unstyled"> 
112            <#list news_documents.getSiblings() as cur_news_document> 
113                <#assign title = cur_news_document.getData()?keep_before_last("?")?split('/')[4] /> 
114                <a href="${cur_news_document.getData()?keep_before_last('/')}" target="_blank" class="d-block news-document"> 
115                    ${title} 
116                </a> 
117            </#list> 
118        </ul> 
119        <script> 
120            document.querySelectorAll(".news-document").forEach(function(element) { 
121                element.textContent = decodeURI(element.textContent); 
122            }); 
123        </script> 
124    </#if> 
125</div> 
126</div> 
127 
128<#-- MACRO: COMPARTILHAR --> 
129<#macro share> 
130    <div class="share"> 
131        <a class="facebook" href="https://www.facebook.com/sharer.php?u=${viewFullURL}" target="_blank">Facebook</a> 
132        <a class="twitter" href="http://twitter.com/intent/tweet?text=${.vars['reserved-article-title'].data}%0AVeja%20mais%20em:&url=${viewFullURL}" target="_blank">Twitter</a> 
133    </div> 
134</#macro> 
135 
136<script> 
137    Liferay.on('allPortletsReady', function() { 
138         function getPreviousPageUrl() { 
139            return document.referrer || ''; 
140
141 
142        function checkPreviousPage() { 
143            var previousPageUrl = getPreviousPageUrl(); 
144            var fromCategoryPage = previousPageUrl.includes('/category/') ? 'true' : 'false'; 
145             
146            // Defina a variável de contexto para o FreeMarker 
147            var meta = document.createElement('meta'); 
148            meta.name = 'fromCategoryPage'; 
149            meta.content = fromCategoryPage; 
150            document.head.appendChild(meta); 
151
152 
153        checkPreviousPage(); 
154		 
155        var breadcrumbList = document.querySelector(".breadcrumb"); 
156        var hasArquivados = false; 
157 
158        // Verifica se o breadcrumb já contém "Arquivados" 
159        if (breadcrumbList) { 
160            var breadcrumbItems = breadcrumbList.querySelectorAll(".breadcrumb-item"); 
161            breadcrumbItems.forEach(function(item) { 
162                if (item.textContent.trim().toLowerCase() === "arquivados") { 
163                    hasArquivados = true; 
164
165            }); 
166
167 
168        // Se "Arquivados" não estiver presente, adicione a categoria "Arquivados" 
169if (!hasArquivados) { 
170    var categorySpan = document.getElementById("journalCategory"); 
171    if (categorySpan) { 
172        var categoryName = categorySpan.getAttribute("data-category-name"); 
173        var categoryUrl = categorySpan.getAttribute("data-category-url"); 
174 
175        var newBreadcrumbItem = document.createElement("li"); 
176        newBreadcrumbItem.className = "breadcrumb-item"; 
177        newBreadcrumbItem.style.fontSize = "13px"; 
178 
179        if (categoryUrl) { 
180            var categoryLink = document.createElement("a"); 
181            categoryLink.href = categoryUrl; 
182            categoryLink.textContent = categoryName; 
183            categoryLink.style.paddingLeft = "8px"; 
184            categoryLink.className = "breadcrumb-link 1"; 
185            newBreadcrumbItem.appendChild(categoryLink); 
186        } else { 
187            newBreadcrumbItem.textContent = categoryName; 
188
189 
190        if (breadcrumbList && breadcrumbList.lastElementChild) { 
191            breadcrumbList.insertBefore(newBreadcrumbItem, breadcrumbList.lastElementChild); 
192
193
194
195 
196        // Atualiza o iframe existente 
197        var oldIframe = document.querySelector('iframe'); 
198        if (oldIframe) { 
199            var parentElement = oldIframe.parentNode; 
200            var newIframe = oldIframe.cloneNode(true); 
201 
202            newIframe.setAttribute('sandbox', 'allow-scripts allow-same-origin'); 
203            newIframe.setAttribute('src', oldIframe.getAttribute('src')); 
204            newIframe.setAttribute('allowfullscreen', oldIframe.hasAttribute('allowfullscreen')); 
205            newIframe.setAttribute('frameborder', oldIframe.getAttribute('frameborder')); 
206            newIframe.setAttribute('height', oldIframe.getAttribute('height')); 
207            newIframe.setAttribute('width', oldIframe.getAttribute('width')); 
208            newIframe.setAttribute('title', oldIframe.getAttribute('title')); 
209 
210            parentElement.replaceChild(newIframe, oldIframe); 
211
212    }); 
213</script> 
214</div>