Ruta de navegació

Ruralcat Actualitat Page Title

Notícies

Més notícies

Més notícies

Publicador de continguts

S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing:
==> xPathChildFieldContent.selectSingleNode(rootElement)  [in template "20154#20194#18034407" at line 38, column 79]

----
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 ARSEC_IMAGEPORTADAACCESS_FILE...  [in template "20154#20194#18034407" at line 37, column 45]
----
1<#if entries?has_content> 
2    <div class="row px-2"> 
3        <#list entries as entry> 
4            <#if entry.getClassName()=='com.liferay.journal.model.JournalArticle'> 
5                <#-- Journal Article --> 
6                    <#assign assetRenderer=entry.getAssetRenderer() /> 
7                    <#assign article=assetRenderer.getArticle() /> 
8                    <#assign articleStructure=article.getDDMStructure() /> 
9                    <#assign articleStructureFields=articleStructure.getRootFieldNames() /> 
10                    <#assign FORMAT_DATE=article.getCreateDate()?string("dd/MM/yyyy") /> 
11                    <#assign document=saxReaderUtil.read(article.getContent()) /> 
12                    <#assign rootElement=document.getRootElement() /> 
13                    <!-- Creacion de la URL para el detalle --> 
14                    <#assign path=themeDisplay.siteGroup.getPathFriendlyURL(false, themeDisplay) 
15                        siteUrl=themeDisplay.siteGroup.getFriendlyURL() sitePathUrl=path+siteUrl 
16                        assetPublisherPortletId="0uQeyOT3Xt80" host="https://ruralcat.gencat.cat" /> 
17                    <#assign ddmFormValuesReader=assetRenderer.getDDMFormValuesReader() /> 
18                    <#assign ddmFormValues=ddmFormValuesReader.getDDMFormValues() /> 
19                    <#assign NoticiaTitulo=htmlUtil.escape(assetRenderer.getTitle(locale)) /> 
20                    <#assign sitioID=assetRenderer.getGroupId() urlTitle=article.getUrlTitle() 
21                        NoticiaURL="${host}${sitePathUrl}/noticia/-/asset_publisher/${assetPublisherPortletId}/content/${urlTitle}/${sitioID}?_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_${assetPublisherPortletId}_assetEntryId=${entry.entryId}" /> 
22                    <!-- FIN Creacion de la URL para el detalle --> 
23                    <#-- Fields --> 
24                        <#list articleStructureFields as field> 
25                            <#assign xPathSelectorDocument=saxReaderUtil.createXPath("dynamic-element 
26                                [@name='${field}' 
27                                ]") /> 
28                            <#assign fieldElement=xPathSelectorDocument.selectSingleNode(rootElement) /> 
29                            <#assign fieldContent=fieldElement.getStringValue() /> 
30                            <#-- Accessing child elements of the group --> 
31                                <#if fieldElement.attribute("type").getValue()=="fieldset"> 
32                                    <#list fieldElement.elements() as groupElement> 
33                                        <#assign childFieldName=groupElement.attribute("name").getValue() /> 
34                                        <#assign childXPath="dynamic-element[@name='${field}']/dynamic-element[@name='${childFieldName}']/dynamic-content" /> 
35                                        <#assign xPathChildFieldContent=saxReaderUtil.createXPath(childXPath) /> 
36                                        <#if childFieldName=='ARSEC_IMAGEPORTADAACCESS_FILE'> 
37                                            <#assign 
38                                                ARSEC_IMAGEPORTADAACCESS_FILE=xPathChildFieldContent.selectSingleNode(rootElement).getStringValue() /> 
39                                            <#assign 
40                                                jsonParser=staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"]> 
41                                                <#assign 
42                                                    jsonObject=jsonParser.createJSONObject(ARSEC_IMAGEPORTADAACCESS_FILE)> 
43                                                    <#if jsonObject.getString("url") !=""> 
44                                                        <#assign FILE_IMAGE=jsonObject.getString("url")> 
45                                                            <#else> 
46                                                                <#assign FILE_IMAGE=themeDisplay.getPortalURL() 
47                                                                    + "/c/document_library/get_file?uuid=" + 
48                                                                    jsonObject.getString("uuid") + "&groupId=" + 
49                                                                    jsonObject.getString("groupId") /> 
50                                                    </#if> 
51                                                    <#elseif 
52                                                        childFieldName=='ARSEC_IMAGEPORTADAACCESS_FILEFieldSetFieldSet'> 
53                                                        <#assign 
54                                                            grandChildXPath=saxReaderUtil.createXPath("dynamic-element[@name='${field}' ]/dynamic-element[@name='${childFieldName}' ]") /> 
55                                                        <#list grandChildXPath.selectSingleNode(rootElement).elements() 
56                                                            as groupElementChild> 
57                                                            <#assign 
58                                                                childFieldName2=groupElementChild.attribute("name").getValue() /> 
59                                                            <#assign childXPath2="dynamic-element[@name='${field}']/dynamic-element[@name='${childFieldName}']/dynamic-element[@name='${childFieldName2}']/dynamic-content" /> 
60                                                            <#assign 
61                                                                xPathChildFieldContent2=saxReaderUtil.createXPath(childXPath) /> 
62                                                            <#if childFieldName2=='ARSEC_IMAGE_LANGPORTADAALT'> 
63                                                                <#assign 
64                                                                    ARSEC_IMAGE_LANGPORTADAALT=grandChildXPath.selectSingleNode(rootElement).getStringValue()?trim /> 
65                                                            </#if> 
66                                                        </#list> 
67                                        </#if> 
68                                    </#list> 
69                                </#if> 
70                                <#if field=='ARSEC_MODULE_LANGTITLE'> 
71                                    <#assign ARSEC_MODULE_LANGTITLE=fieldContent?trim /> 
72                                </#if> 
73                                <!-- Si el contenido no tiene rellenado el alt, se le asigna el titulo --> 
74                                <#if !ARSEC_IMAGE_LANGPORTADAALT??> 
75                                    <#assign ARSEC_IMAGE_LANGPORTADAALT=ARSEC_MODULE_LANGTITLE /> 
76                                </#if> 
77                        </#list> 
78                        <div class="oficina_fertilizacio_noticia_container movil_width_100 col-lg-3 col-sm-6 mb-2"> 
79                            <div class="oficina_fertilizacio_noticia_container_in"> 
80                                <a href="${NoticiaURL}" title="${ARSEC_MODULE_LANGTITLE}"> 
81                                    <div class="oficina_fertilizacio_noticia_image_container"> 
82                                        <img src="${FILE_IMAGE}" class="oficina_fertilizacio_noticia_image" 
83                                            alt="${ARSEC_IMAGE_LANGPORTADAALT}"> 
84                                    </div> 
85                                    <div class="oficina_fertilizacio_noticia_titulo"> 
86                                        ${ARSEC_MODULE_LANGTITLE} 
87                                    </div> 
88                                </a> 
89                                <div class="oficina_fertilizacio_noticia_titulo_separador"></div> 
90                                <div class="oficina_fertilizacio_noticia_pie"> 
91																	<i class="far fa-clock"></i> 
92                                    <span style="text-transform: capitalize"> 
93                                        ${FORMAT_DATE} 
94                                    </span> 
95                                </div> 
96                            </div> 
97                        </div> 
98            </#if> 
99        </#list> 
100    </div> 
101</#if>