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: 268px; 
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: 268px; 
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: 250px; 
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        <div class="col-12 col-md-9 noticias-general-resultados"> 
86        	<#list entries as curEntry> 
87        	 
88        		<#assign currentJArticle = curEntry.getAssetRenderer().getAssetObject() /> 
89        		 
90        		<@liferay_journal["journal-article"] 
91        		    articleId=currentJArticle.getArticleId() 
92        		    groupId=currentJArticle.getGroupId() 
93        		    ddmTemplateKey="37301" 
94        		/> 
95        		 
96        		<#if !curEntry?is_last> 
97        		    <hr class="resultados-separador"></hr> 
98        		</#if> 
99        		 
100        	</#list> 
101        </div> 
102    </#if> 
103     
104    <div class="col-12 col-md-3 noticias-general-ads"> 
105        <div class="mx-auto mr-md-0 mb-3"> 
106            <@liferay_journal["journal-article"] 
107    		    articleId="42416" 
108    		    groupId=themeDisplay.getScopeGroupId() 
109    		/> 
110        </div> 
111        <div class="mx-auto mr-md-0"> 
112            <@liferay_journal["journal-article"] 
113    		    articleId="42390" 
114    		    groupId=themeDisplay.getScopeGroupId() 
115    		/> 
116        </div> 
117    </div> 
118 
119</div> 
120 
121<script type="text/javascript"> 
122 
123    var defaultRssElement = CRTVGModule.getElementBySelector("#p_p_id_${portletDisplay.getId()}_ .subscribe-action"); 
124    CRTVGModule.hideElement(defaultRssElement); 
125     
126    var customRssElement = CRTVGModule.getElementBySelector("#p_p_id_${portletDisplay.getId()}_ .noticias-rss-container"); 
127    CRTVGModule.displayElement(customRssElement); 
128     
129</script>