Boletines de monitorización del discurso de odio ilegal en línea - Observatorio Español del Racismo y la Xenofobia
Ruta de navegación
Visualización del menú
Boletines de monitorización del discurso de odio ilegal en línea
Navegación por categorías
Publicador de contenidos
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> journalArticle.getResourcePrimKey [in template "20097#20123#6861829" at line 56, column 115]
----
Tip: It's the step after the last dot that caused this error, not those before it.
----
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 assetEntry = assetEntryLocalS... [in template "20097#20123#6861829" at line 56, column 17]
----
1<#assign customJournalUtil = serviceLocator.findService("es.gob.inclusion.base.util.CustomJournalUtil")>
2<#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") />
3<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
4<#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") />
5<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
6
7<#assign propertyTemplateId = "OBERAXE-BOLETIN-MEMORIA-TEMPLATE-NIPO">
8
9<#assign globalGroup = groupLocalService.getCompanyGroup(company.getCompanyId()) />
10<#assign repositoryGroupId = globalGroup.getGroupId() />
11
12<#assign vocabularyName = "observatorio español del racismo y la xenofobia" />
13<#assign parentCategoryName = "Boletines - Tipo" />
14<#assign tipos = ["mensual", "bimestral", "trimestral", "anual"] />
15<#assign backgroundStyles = ["white-bg", "gray-bg"] />
16
17<#assign vocabularies = assetVocabularyLocalService.getGroupVocabularies(repositoryGroupId) />
18<#assign vocabularyId = 0 />
19<#list vocabularies as vocab>
20 <#if vocab.getName()?lower_case == vocabularyName?lower_case>
21 <#assign vocabularyId = vocab.getVocabularyId()>
22 <#break>
23 </#if>
24</#list>
25
26<#assign parentCategoryId = 0 />
27<#assign allCategories = (vocabularyId != 0)?then(assetCategoryLocalService.getVocabularyCategories(vocabularyId, -1, -1, null), []) />
28<#list allCategories as cat>
29 <#if cat.getName()?lower_case == parentCategoryName?lower_case && cat.getGroupId() == repositoryGroupId>
30 <#assign parentCategoryId = cat.getCategoryId()>
31 <#break>
32 </#if>
33</#list>
34
35<#assign tipoCategoryMap = {} />
36<#if parentCategoryId != 0>
37 <#assign childCategories = assetCategoryLocalService.getChildCategories(parentCategoryId) />
38 <#list tipos as tipo>
39 <#list childCategories as subcat>
40 <#if subcat.getName()?lower_case == tipo>
41 <#assign tipoCategoryMap = tipoCategoryMap + { (tipo) : subcat.getCategoryId() } />
42 <#break>
43 </#if>
44 </#list>
45 </#list>
46</#if>
47
48<#if entries?has_content>
49 <#assign bgIndex = 0 />
50 <#list tipos as tipo>
51 <#assign targetCategoryId = tipoCategoryMap[tipo]!0 />
52 <#assign matchedEntries = [] />
53 <#if targetCategoryId != 0>
54 <#list entries as curEntry>
55 <#assign journalArticle = curEntry.getAssetRenderer().getAssetObject() />
56 <#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()) />
57 <#assign categoryIds = assetEntry.getCategoryIds() />
58 <#if categoryIds?seq_contains(targetCategoryId)>
59 <#assign matchedEntries += [curEntry] />
60 </#if>
61 </#list>
62 </#if>
63
64 <#if matchedEntries?has_content>
65 <div class="o-boletines-anuales-container o-boletines-anuales-${backgroundStyles[bgIndex % backgroundStyles?size]}">
66 <div class="container">
67 <h2><@liferay.language key="es.gob.inclusion.oberaxe.boletines.${tipo}" /></h2>
68 <ul class="o-boletines-anuales-list m-listBaseNoStyles">
69 <#list matchedEntries as curEntry>
70 <#assign journalArticle = curEntry.getAssetRenderer().getAssetObject() />
71 <li class="m-listNews__item m-link-accessible-wrapper">
72 ${customJournalUtil.getHTMLFromJournalArticle(journalArticle.getArticleId(), journalArticle.getGroupId(), propertyTemplateId, themeDisplay)}
73 </li>
74 </#list>
75 </ul>
76 </div>
77 </div>
78 <#assign bgIndex++ />
79 </#if>
80 </#list>
81</#if>
82
83<#function getFieldValue entry fieldName>
84 <#assign
85 assetRenderer = entry.getAssetRenderer()
86 journalArticle = assetRenderer.getAssetObject()
87 ddmFormValues = journalArticle.getDDMFormValues()
88 ddmFormFieldValuesMap = ddmFormValues.getDDMFormFieldValuesMap(false)
89 ddmFormFieldValueList = ddmFormFieldValuesMap[fieldName]
90 ddmFormFieldValue = ddmFormFieldValueList[0]
91 value = ddmFormFieldValue.getValue()
92 fieldValue = value.getString(locale)
93 />
94 <#return fieldValue />
95</#function>
96
97<script>
98 $('.o-boletines-anuales-container').each(function () {
99 if ($(this).find('.m-listNews__item').length == 0) {
100 $(this).remove();
101 }
102 });
103</script>