Publicador de contidos

Publicador de contidos

Produciuse un erro ao procesar o modelo.
The following has evaluated to null or missing:
==> crtvgContentUtilApi.getCategoryById(categoryParam)  [in template "20097#20123#37355" at line 35, column 44]

----
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 categoryObj = crtvgContentUti...  [in template "20097#20123#37355" at line 35, column 21]
----
1<style> 
2    .noticias-general-ads .crtvg-ads:not(.crtvg-long-ad)   { 
3        width: 100%; 
4        max-width: 300px; 
5        height: 100%; 
6        max-height: none; 
7
8    .noticias-general-ads .crtvg-ads:not(.crtvg-long-ad) .crtvg-ads-item { 
9        width: 100%; 
10        max-width: 300px; 
11        height: 100%; 
12        max-height: none; 
13
14     
15    .noticias-general-ads .crtvg-ads:not(.crtvg-long-ad) .crtvg-ads-item > div { 
16        width: 100%; 
17        max-width: 300px; 
18        height: 100%; 
19        max-height: none; 
20
21</style> 
22 
23<div class="row noticias-general"> 
24 
25    <#assign categoryParam = getterUtil.get(renderRequest.getOriginalHttpServletRequest().getParameter("p_r_p_categoryId"),"") /> 
26    <#assign tagParam = getterUtil.get(renderRequest.getOriginalHttpServletRequest().getParameter("p_r_p_tag"),"") /> 
27     
28    <div class="col-12 noticias-general-title-group"> 
29        <#if (categoryParam?? && categoryParam?has_content && categoryParam != "") || (tagParam?? && tagParam?has_content && tagParam != "")> 
30             
31            <#assign assetPublisherDisplayContext = renderRequest.getAttribute("ASSET_PUBLISHER_DISPLAY_CONTEXT") /> 
32             
33            <h1 class="noticias-general-title"> 
34                <#if (categoryParam?? && categoryParam?has_content && categoryParam != "")> 
35                    <#assign categoryObj = crtvgContentUtilApi.getCategoryById(categoryParam) /> 
36                    <#if categoryObj??> 
37                        ${categoryObj.getName()?capitalize} 
38                    </#if> 
39                <#elseif (tagParam?? && tagParam?has_content && tagParam != "")> 
40                    ${tagParam?capitalize} 
41                </#if> 
42            </h1> 
43            <#if portalUtil.isRSSFeedsEnabled() && assetPublisherDisplayContext.isEnableRSS() > 
44             
45                <#assign rssUrl = "#" /> 
46                <#if (categoryParam?? && categoryParam?has_content && categoryParam != "")> 
47                    <#assign categoryId = getterUtil.getLong(categoryParam) /> 
48                    <#assign rssUrl = crtvgContentUtilApi.getRssUrlByCategory(renderRequest,categoryId) /> 
49                <#elseif (tagParam?? && tagParam?has_content && tagParam != "")> 
50                    <#assign rssUrl = crtvgContentUtilApi.getRssUrlByTag(renderRequest,tagParam) /> 
51                </#if> 
52                 
53                <div class="btn-group-item noticias-rss-container d-none"> 
54                    <a href="${rssUrl}" target="_blank"> 
55                        <span class="rssIcon"><@crtvg_ui["crtvgicon"] iconName="rss" /></span>  
56                        <span class="rssText">RSS</span>   
57                    </a> 
58                </div> 
59                 
60            </#if> 
61             
62        <#else> 
63         
64            <#assign categoryPageTitle = crtvgContentUtilApi.getPageCategoryTitle(layout) /> 
65         
66            <h1 class="noticias-general-title"> 
67                <#if categoryPageTitle != ""> 
68                    ${categoryPageTitle} 
69                <#else> 
70                    ${languageUtil.get(locale, "publicador.noticias.general.titleDefault")} 
71                </#if> 
72            </h1> 
73            <div class="btn-group-item noticias-rss-container d-none"> 
74                <a href="${crtvgContentUtilApi.getRssUrl(renderRequest)}" target="_blank"> 
75                    <span class="rssIcon"><@crtvg_ui["crtvgicon"] iconName="rss" /></span> 
76                    <span class="rssText">RSS</span> 
77                </a> 
78            </div> 
79     
80        </#if> 
81         
82    </div> 
83 
84    <#if entries?has_content> 
85         
86          <#if categoryParam?has_content> 
87                <#if categoryParam=="37921"> 
88                    <#assign sortedEntries = entries?sort_by("title")> 
89               <#else> 
90                    <#assign sortedEntries = entries> 
91               </#if> 
92            <#else> 
93                    <#assign sortedEntries = entries> 
94           </#if> 
95         
96        <div class="col-12 col-md-9 noticias-general-resultados"> 
97        	<#list sortedEntries as curEntry> 
98        	 
99        		<#assign currentJArticle = curEntry.getAssetRenderer().getAssetObject() /> 
100        		 
101        		<#if categoryParam=="37921"> 
102            		<@liferay_journal["journal-article"] 
103            		    articleId=currentJArticle.getArticleId() 
104            		    groupId=currentJArticle.getGroupId() 
105            		    ddmTemplateKey="3349801" 
106            		/> 
107        		<#else> 
108        		   <@liferay_journal["journal-article"] 
109        		    articleId=currentJArticle.getArticleId() 
110        		    groupId=currentJArticle.getGroupId() 
111        		    ddmTemplateKey="37301" 
112        		/> 
113        		</#if> 
114        		 
115        		 
116        		<#if !curEntry?is_last> 
117        		    <hr class="resultados-separador"></hr> 
118        		</#if> 
119        		 
120        	</#list> 
121        </div> 
122    </#if> 
123     
124    <div class="col-12 col-md-3 noticias-general-ads"> 
125        <div class="mx-auto mr-md-0 mb-3"> 
126            <@liferay_journal["journal-article"] 
127    		    articleId="1082503" 
128    		    groupId=themeDisplay.getScopeGroupId() 
129    		/> 
130        </div> 
131        <div class="mx-auto mr-md-0"> 
132            <@liferay_journal["journal-article"] 
133    		    articleId="1082524" 
134    		    groupId=themeDisplay.getScopeGroupId() 
135    		/> 
136        </div> 
137    </div> 
138 
139</div> 
140 
141<script type="text/javascript"> 
142 
143    var defaultRssElement = CRTVGModule.getElementBySelector("#p_p_id_${portletDisplay.getId()}_ .subscribe-action"); 
144    CRTVGModule.hideElement(defaultRssElement); 
145     
146    var customRssElement = CRTVGModule.getElementBySelector("#p_p_id_${portletDisplay.getId()}_ .noticias-rss-container"); 
147    CRTVGModule.displayElement(customRssElement); 
148     
149</script>