aleksandar_trif
Returning Observer

Error header function

Jump to solution

Hello Community,

I'm currently working on fs4.2 server on the project that needs to be migrated. When I go to site structure and open any of the pages, right click and show preview errors I have 2 errors that are repeated throughout the project

31.07.2019 10:30:05.498 ERROR (header function 'Navigation', resultname = 'fr_mainnavi_first' at 27, 1):  at 27, 1: invalid value for parameter 'selectedNode', invalid reference ''

<CMS_FUNCTION name="Navigation" resultname="fr_mainnavi_element">

     <CMS_PARAM name="expansionVisibility" value="pathonly"/>

     <CMS_PARAM name="wholePathSelected" value="1"/>

     <CMS_VALUE_PARAM name="selectedNode" value="st_pageref_1.referenceName"/>

     <CMS_ARRAY_PARAM name="selectedHTML">

          <CMS_ARRAY_ELEMENT>

               <![CDATA[<li id="we-nav-$CMS_VALUE(set_section_count)$" class="we-nav-$CMS_VALUE(set_section_count)$ we-nav-$CMS_VALUE(set_section_count)$-$CMS_VALUE(#global.language.abbreviation)$$CMS_SET(set_ref,#nav.ref.referenceName)$$CMS_VALUE(fr_mainnavi_active,default:"")$"><a      href="$CMS_REF(#nav.ref.referenceName,language:set_language)$">$CMS_VALUE(#nav.label.convert2,default:"")$</a></li>]]>

          </CMS_ARRAY_ELEMENT>

     </CMS_ARRAY_PARAM>

</CMS_FUNCTION>

31.07.2019 10:30:05.499 ERROR (header function 'Navigation', resultname = 'fr_mainnavi_element' at 16, 1):  at 16, 1: invalid value for parameter 'selectedNode', invalid reference ''

So my question is do you have any idea what causes this error ?

Kind regards,

Aleksandar

1 Solution

Accepted Solutions

Hi Aleksandar,

the error message already says what's the problem, right?! 😉

st_pageref_1.referenceName is an invalid reference. There is a form element called st_pageref_1 that should contain a reference that determines the currently sleected node in  the navigation. Maybe this was implemented to be able to overwrite the currently selected node. You should use a define function beofre the Navigation function to check if the pageref is set and if yes use it as the selected node. Otherwise use the current pageref.

best regards

Felix

View solution in original post

3 Replies
aleksandar_trif
Returning Observer

Here is the complete code for both of the errors :

<CMS_FUNCTION name="Navigation" resultname="fr_mainnavi_element">

<CMS_PARAM name="expansionVisibility" value="pathonly"/>

<CMS_PARAM name="wholePathSelected" value="1"/>

<CMS_VALUE_PARAM name="selectedNode" value="st_pageref_1.referenceName"/>

<CMS_ARRAY_PARAM name="selectedHTML">

<CMS_ARRAY_ELEMENT>

<![CDATA[<li id="we-nav-$CMS_VALUE(set_section_count)$" class="we-nav-$CMS_VALUE(set_section_count)$ we-nav-$CMS_VALUE(set_section_count)$-$CMS_VALUE(#global.language.abbreviation)$$CMS_SET(set_ref,#nav.ref.referenceName)$$CMS_VALUE(fr_mainnavi_active,default:"")$"><a href="$CMS_REF(#nav.ref.referenceName,language:set_language)$">$CMS_VALUE(#nav.label.convert2,default:"")$</a></li>]]>

</CMS_ARRAY_ELEMENT>

</CMS_ARRAY_PARAM>

</CMS_FUNCTION>

<CMS_FUNCTION name="Navigation" resultname="fr_mainnavi_first">

<CMS_PARAM name="expansionVisibility" value="pathonly"/>

<CMS_PARAM name="wholePathSelected" value="1"/>

<CMS_VALUE_PARAM name="selectedNode" value="st_pageref_1.referenceName"/>

<CMS_ARRAY_PARAM name="selectedHTML">

<CMS_ARRAY_ELEMENT>

<![CDATA[<a class="$CMS_SET(set_ref,#nav.ref.referenceName)$$CMS_VALUE(fr_mainnavi_active)$" id="we-link" href="$CMS_REF(#nav.ref.referenceName,language:set_language)$">$CMS_VALUE(#nav.label,default:"")$</a>]]>

</CMS_ARRAY_ELEMENT>

</CMS_ARRAY_PARAM>

</CMS_FUNCTION>

0 Kudos

Hi Aleksandar,

the error message already says what's the problem, right?! 😉

st_pageref_1.referenceName is an invalid reference. There is a form element called st_pageref_1 that should contain a reference that determines the currently sleected node in  the navigation. Maybe this was implemented to be able to overwrite the currently selected node. You should use a define function beofre the Navigation function to check if the pageref is set and if yes use it as the selected node. Otherwise use the current pageref.

best regards

Felix

Thank you Felix, I have fixed the issue.

0 Kudos