Notícias do TST

Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing:
==> curEntry.getAssetRenderer()  [in template "10132#10165#27451142" at line 6, column 38]

----
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: #assign assetRenderer = curEntry.getA...  [in template "10132#10165#27451142" at line 6, column 13]
----
1<#-- https://docs.liferay.com/portal/7.0/javadocs/portal-kernel/com/liferay/asset/kernel/model/AssetRenderer.html --> 
2 
3<div class="noticia noticias-lista"> 
4    <#if entries?has_content> 
5        <#list entries as curEntry> 
6            <#assign assetRenderer = curEntry.getAssetRenderer() /> 
7            <#assign journalArticle = assetRenderer.getArticle() /> 
8            <#assign docXml = saxReaderUtil.read(journalArticle.getContent()) /> 
9 
10            <#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) /> 
11            <#assign targetViewUrl = "web/guest/noticias" /> 
12            <#assign targetPortletID = "89Dk" /> 
13            <#assign viewURL = "/${targetViewUrl}/-/asset_publisher/${targetPortletID}/content/id/${curEntry.getEntryId()}" /> 
14            <#assign GroupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")> 
15            <#assign entryGroupUrl = GroupLocalService.getGroup(curEntry.getGroupId()).getDisplayURL(themeDisplay) /> 
16            <#assign urltitle = assetRenderer.getUrlTitle() /> 
17            <#assign viewURL = "${entryGroupUrl}/-/${urltitle}" /> 
18 
19            <#assign xmlValue = docXml.valueOf("//dynamic-element[@name='imagem_destaque']/dynamic-content[@language-id='pt_BR']/text()") /> 
20            <#assign urlThumb = "" /> 
21            <#if xmlValue?has_content> 
22                <#assign urlThumb = getArticleDLEntryUrl(xmlValue) /> 
23            </#if> 
24 
25            <#if !urlThumb?has_content> 
26                <#assign urlThumb = assetRenderer.getThumbnailPath(renderRequest)!"" /> 
27            </#if> 
28            <div class="abstract-wrapper"> 
29                <div class="asset-abstract"> 
30                    <div class="lfr-meta-actions asset-actions"> 
31                        <@getEditIcon /> 
32                    </div> 
33 
34                    <h3 class="asset-title"> 
35                        <a 
36                            data-senna-off="true"  
37                            href="${viewURL}" 
38
39                            ${curEntry.getTitle(locale)} 
40                        </a> 
41                    </h3> 
42 
43                    <div class="asset-content"> 
44                        <div class="asset-summary"> 
45                            <#if urlThumb?has_content> 
46                                <div class="asset-small-image"> 
47                                    <a 
48                                        data-senna-off="true"  
49                                        href="${viewURL}" 
50
51                                        <img alt="${curEntry.getTitle(locale)}" class="asset-small-image" src="${urlThumb?replace(' ', '%20')}"/> 
52                                    </a> 
53                                </div> 
54                            </#if> 
55                            ${curEntry.getSummary(locale)} 
56                        </div> 
57<!-- 
58                        <div class="asset-more"> 
59                            <a 
60                                href="${viewURL}" 
61                                data-senna-off="true"  
62
63                                Ler mais 
64                                <span class="hide-accessible">sobre ${curEntry.getTitle(locale)}</span> 
65                                » 
66                            </a> 
67                        
68                        </div> 
69-->                         
70                    </div> 
71                     
72                    <div class="asset-metadata"> 
73                        <div class="row align-items-center m-0"> 
74                            <#if metadataFields?contains("create-date") || metadataFields?contains("publish-date")> 
75                                <div class="col-auto column help-block publish-date pl-0"> 
76                                    <div class="column-content help-block-content "> 
77                                        <#assign dateFormat = "dd/MM/yyyy - HH:mm:ss" /> 
78                                        <#assign publishDate = dateUtil.getDate(curEntry.getPublishDate(), dateFormat, locale) /> 
79										<dt class="label">Data de publicação</dt> 
80                                        <dd class="metadata-entry metadata-publish-date">${(curEntry.getPublishDate()?long - 10800000)?number_to_date?string("dd/MM/yyyy - HH:mm:ss")}</dd> 
81                                    </div> 
82                                </div> 
83                                <#if metadataFields?contains("view-count")> 
84                                    <span class="vertical-separator"><!-- --></span> 
85                                </#if> 
86                            </#if> 
87                            <#if metadataFields?contains("view-count")> 
88                                <div class="col-auto column help-block view-count"> 
89                                    <div class="column-content help-block-content "> 
90                                        <dt class="label">Número de visualizações</dt> 
91                                        <dd class="metadata-entry metadata-view-count">${curEntry.getViewCount()} <@liferay.language key="views" /></dd> 
92                                    </div> 
93                                </div> 
94                            </#if> 
95                        </div> 
96                    </div> 
97                </div> 
98            </div> 
99        </#list> 
100    </#if> 
101</div> 
102 
103<#macro getEditIcon> 
104	<#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
105		<#assign redirectURL = renderResponse.createRenderURL() /> 
106 
107		${redirectURL.setParameter("mvcPath", "/add_asset_redirect.jsp")} 
108		${redirectURL.setWindowState("pop_up")} 
109 
110		<#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
111 
112		<#if validator.isNotNull(editPortletURL)> 
113			<#assign title = languageUtil.format(locale, "edit-x", entryTitle, false) /> 
114 
115			<@liferay_ui["icon"] 
116				cssClass="icon-monospaced visible-interaction" 
117				icon="pencil" 
118				markupView="lexicon" 
119				message=title 
120				url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
121			/> 
122		</#if> 
123	</#if> 
124</#macro> 
125 
126 
127<#--  Retonar a URL da imagem completa  --> 
128<#function  getArticleDLEntryUrl xmlValue> 
129    <#if !xmlValue?has_content> 
130        <#return "" /> 
131    </#if> 
132    <#local JSONFactoryUtil = staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"] /> 
133    <#local assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
134    <#local DLFileEntryModel = "com.liferay.document.library.kernel.model.DLFileEntry" /> 
135    <#local imgJson = JSONFactoryUtil.createJSONObject(xmlValue) /> 
136    <#local imgUrl = imgJson.getString("url")!""> 
137    <#if imgUrl?has_content> 
138        <#return imgUrl /> 
139    </#if> 
140    <#local fileEntryId = imgJson.getLong("fileEntryId")!imgJson.getLong("fileentryid")!imgJson.getLong("classPK") /> 
141    <#local assetEntry = assetEntryLocalService.fetchEntry(DLFileEntryModel, fileEntryId)!"" /> 
142    <#if !assetEntry?has_content> 
143        <#return "" /> 
144    </#if> 
145    <#local assetRenderer = assetEntry.assetRenderer /> 
146    <#return assetRenderer.getURLDownload(themeDisplay)?remove_ending('&download=true')/> 
147</#function>	 
148 
149<script> 
150Liferay.on('allPortletsReady', function() { 
151    var paginationButtons = $('.lfr-pagination-buttons'); 
152    var lastPageItem = paginationButtons.find('li.last'); 
153    var linkInside = lastPageItem.find('a'); 
154 
155    lastPageItem.addClass('disabled d-block'); 
156    linkInside.removeAttr('href'); 
157}); 
158 
159</script> 
160 
161<style> 
162.last{display:none;} 
163</style> 

Publicador de Conteúdo Web

Portlet está temporariamente indisponível.