Atualidade - Direção Geral do Tesouro
Ocorreu um erro ao processar o template.
Java method "com.liferay.portal.json.JSONFactoryImpl.createJSONObject(String)" threw an exception when invoked on com.liferay.portal.json.JSONFactoryImpl object "com.liferay.portal.json.JSONFactoryImpl@637d0ab"; see cause exception in the Java stack trace.
----
FTL stack trace ("~" means nesting-related):
- Failed at: jsonData = jsonFactoryUtil.createJSON... [in template "20099#20135#93540" in macro "asset_entries_include" at line 21, column 7]
- Reached through: #assign-container [in template "20099#20135#93540" in macro "asset_entries_include" at line 4, column 5]
- Reached through: @asset_entries_include assetEntryCont... [in template "20099#20135#93540" at line 29, column 834]
---- 1<div class="mf-noticias"> 2 3 <#macro asset_entries_include assetEntryContext> 4 <#assign 5 6 <#-- Needed in order to get the img url --> 7 dlAppService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService") 8 dlUtil = serviceLocator.findService("com.liferay.document.library.kernel.util.DLUtil") 9 10 <#-- Get access to the journal article context and content --> 11 renderer = assetEntryContext.getAssetRenderer() 12 journalArticle = renderer.getArticle() 13 document = saxReaderUtil.read(journalArticle.getContent()) 14 rootElement = document.getRootElement() 15 16 <#-- Get custom web content structure fields --> 17 xPathSelectorImage = saxReaderUtil.createXPath("dynamic-element[@name='imagemNoticia']") 18 imageSrc = xPathSelectorImage.selectSingleNode(rootElement) 19 20 <#-- Needed in order to get the img url field of a custom structure associated to a journal article --> 21 jsonData = jsonFactoryUtil.createJSONObject(imageSrc.getStringValue()) 22 fileEntryId = getterUtil.getInteger(jsonData.get('fileEntryId')) 23 24 <#-- Get entry categories list--> 25 entryCategories = assetEntryContext.getCategories() 26 27 <#-- Get Vocabulary Service--> 28 assetVocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") 29 /> <#-- Create urlImage --> <#if fileEntryId?? && fileEntryId!=0> <#assign fileEntry = dlAppService.getFileEntry(fileEntryId) urlImage = dlUtil.getDownloadURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, null) /> <#else> <#assign urlImage = "#"> </#if> <#-- To get the context of viewUrl in order to open on configured content display page --> <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetEntryContext) /> <#if assetLinkBehavior != "showFullContent"> <#assign viewURL = renderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> </#if> </#macro> <h1 class="bottom-gap"> Notícias</h1> <hr> <div class="row"> <div class="col-md-12"> <div class="mf-noticias__item mf-noticias__item--bigger"> <div class="row"> <#if entries?has_content> <#list entries as curEntry> <@asset_entries_include assetEntryContext=curEntry /> <div class="col-md-4"> <span class="mf-noticias__category"> <#list entryCategories as category> 30 <#assign vocabulary = assetVocabularyService.getVocabulary(category.vocabularyId) /> 31 32 <#if vocabulary.getTitle(locale) == "Categorias da Página de Início" > 33 ${category.getTitle(locale)} 34 </#if> 35 </#list> </span> <div class="row"> <div class="col-md-12"> <div class="mf-noticias__thumbnail"> <a href="${viewURL}"> <#if imageSrc?? && imageSrc!=""> <picture class="mf-noticias__picture mf-noticias__big-picture"> <img class="mf-noticias__image" src="${urlImage}" alt=""> </picture> </#if> </a> </div> </div> <div class="col-md-12"> <a href="${viewURL}" class="mf-link mf-color--gold"> <p class="mf-noticias__text mf-noticias__text--normal mf-noticias__destaque-title"> ${curEntry.getTitle(locale)} </p> </a> </div> </div> </div> </#list> </#if> </div> </div> </div> </div> <hr> </div> Ocorreu um erro ao processar o template.
Java method "com.liferay.portal.json.JSONFactoryImpl.createJSONObject(String)" threw an exception when invoked on com.liferay.portal.json.JSONFactoryImpl object "com.liferay.portal.json.JSONFactoryImpl@637d0ab"; see cause exception in the Java stack trace.
----
FTL stack trace ("~" means nesting-related):
- Failed at: jsonData = jsonFactoryUtil.createJSON... [in template "20099#20135#93544" in macro "asset_entries_include" at line 21, column 7]
- Reached through: #assign-container [in template "20099#20135#93544" in macro "asset_entries_include" at line 4, column 5]
- Reached through: @asset_entries_include assetEntryCont... [in template "20099#20135#93544" at line 34, column 808]
---- 1<div class="mf-noticias"> 2 3 <#macro asset_entries_include assetEntryContext> 4 <#assign 5 6 <#-- Needed in order to get the img url --> 7 dlAppService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService") 8 dlUtil = serviceLocator.findService("com.liferay.document.library.kernel.util.DLUtil") 9 10 <#-- Get access to the journal article context and content --> 11 renderer = assetEntryContext.getAssetRenderer() 12 journalArticle = renderer.getArticle() 13 document = saxReaderUtil.read(journalArticle.getContent()) 14 rootElement = document.getRootElement() 15 16 <#-- Get custom web content structure fields --> 17 xPathSelectorImage = saxReaderUtil.createXPath("dynamic-element[@name='imagemNoticia']") 18 imageSrc = xPathSelectorImage.selectSingleNode(rootElement) 19 20 <#-- Needed in order to get the img url field of a custom structure associated to a journal article --> 21 jsonData = jsonFactoryUtil.createJSONObject(imageSrc.getStringValue()) 22 fileEntryId = getterUtil.getInteger(jsonData.get('fileEntryId')) 23 24 <#-- Get entry categories list--> 25 entryCategories = assetEntryContext.getCategories() 26 27 <#-- Get Vocabulary Service--> 28 assetVocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") 29 30 /> 31 32 33 34 <#-- Create urlImage --> <#if fileEntryId?? && fileEntryId!=0> <#assign fileEntry = dlAppService.getFileEntry(fileEntryId) urlImage = dlUtil.getDownloadURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, null) /> <#else> <#assign urlImage = "#"> </#if> <#-- To get the context of viewUrl in order to open on configured content display page --> <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetEntryContext) /> <#if assetLinkBehavior != "showFullContent"> <#assign viewURL = renderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> </#if> </#macro> <!-- <h1 class="bottom-gap">Notícias</h1><hr><br>--> <#if entries?has_content> <div class="mf-noticias__item mf-noticias__item--list bottom-gap"> <div class="row"> <#list entries as curEntry> <@asset_entries_include assetEntryContext=curEntry /> <div class="col-md-6" style="margin-bottom:1%;"> <div class="row"> <div class="col-md-4"> <div class="mf-noticias__thumbnail"> <a href="${viewURL}" class="mf-link mf-color--gold"> <#if imageSrc?? && imageSrc!=""> <picture class="mf-noticias__picture"> <img class="mf-noticias__image" src="${urlImage}" alt=""> </picture> </#if> </a> </div> </div> <div class="col-md-8"> <div class="row"> <div class="col-md-12"> <span class="mf-noticias__category"> <#list entryCategories as category> 35 <#assign vocabulary = assetVocabularyService.getVocabulary(category.vocabularyId) /> 36 37 <#if vocabulary.getTitle(locale) == "Categorias da Página de Início" > 38 ${category.getTitle(locale)} 39 </#if> 40 </#list></span> </div> <div class="col-md-12"> <a href="${viewURL}" class="mf-link mf-color--gold"> <p class="mf-noticias__text mf-noticias__text--normal"> ${curEntry.getTitle(locale)} </p> </a> </div> </div> </div> </div> </div> </#list> </div></div> </#if> </div> — 1 Itens por página