Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-11884

[Grid/Repeater/headerLabel] Error in header label if ref to non present attributes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.8.2, 4.9.0
    • None
    • None
    • None

      How to reproduce:

      • Create a content type with a repeater containing
        • 2 attributes of type content
        • a header label referencing the 2 attributes
      • Create a searchModel on this content type
        • with a column for the repeater
        • and only one subcolumn (one of the attribute of type content)
      • Create a content of this type
        • Add entries in the repeater with data for the 2 attributes
      • Make a search using the search model
        • There is a column for the repeater => OK
        • the label of each entry has an error as it does not find the value of the content => KO

       

      Exemple of repeater definition :
       

      <attribute type="repeater" name="repeaterHeaderLabel">
          <label>Repeater header label</label>
          <description>Description repeater avec header label</description>
          <add-label>Ajouter</add-label>
          <del-label>Supprimer</del-label>
       
          <header-label>{linkedArticle} {linkedArticles}</header-label>
       
          <attribute name="linkedArticle" type="content" contentType="org.ametys.web.default.Content.article">
              <label>Lien 1 Article</label>
              <description>Article lié</description>
          </attribute>
       
          <attribute name="linkedArticles" type="content" multiple="true" contentType="org.ametys.web.default.Content.article">
              <label>Liens 2 Articles</label>
              <description>Articles liés</description>
          </attribute>
      </attribute>
      

       

      Exemple of search model columns :
       

      <columns>
          <default>
              <item ref="title">
                  <renderer>Ametys.plugins.cms.search.SearchGridHelper.renderTitle</renderer>
              </item>
              <item ref="repeaterHeaderLabel">
                  <item ref="linkedArticles" />
              </item>
          </default>
      </columns>
      

       

            Unassigned Unassigned
            cbayle Caroline Bayle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: