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

[SearchGrid] Supports enumeration on other types than string

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.4.4, 4.5.0
    • 4.4.3, 4.5.0
    • None
    • None
    • 4.5 M3

      In results of search models, enumerated values that are not contents or string are not supported.

      Steps to reproduce

      1. Add a content attribute with long type and an enumerator like:
           <cms:metadata name="longAttribute" type="long">
               <cms:label i18n="false">My long attribute</cms:label>
               <cms:description i18n="false">My long attribute</cms:description>
               <enumeration>
                    <entry>
                        <label>Valeur 1</label>
                        <value>1</value>
                    </entry>
                    <entry>
                        <label>Valeur 2</label>
                        <value>2</value>
                    </entry>
               </enumeration>
           </cms:metadata>
      2. Fill a content with this attribute
      3. Launch a Solr search (a classic search has the same behaviour) on this content and display your long attribute like:
        • Content type: MyContentType
        • Query: longAttribute:*
        • Columns: title, longAttribute
          # In the results, the long attribute is displayed as [Object object]

            cbayle Caroline Bayle
            bmaurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: