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

Unable to use a system-ref and a metadata-ref with same name as result column of search tool

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.8.10, 4.9.0
    • 4.0M7
    • Plugin : Search
    • None

      I tried with the blog search, as posts can have system tags and tags as metadata

      <columns>
              <default>
                  <column metadata-ref="title">
                      <renderer>Ametys.cms.content.EditContentsGrid.renderTitle</renderer>
                  </column>
                  <column system-ref="tags"/>
                  <column metadata-ref="tags"/>
      </columns>
      
      Caused by: org.apache.avalon.framework.configuration.ConfigurationException: Unable to instanciate MetadataSearchUIColumn for metadata tags @null:80:42
      	at org.ametys.cms.search.ui.model.StaticSearchUIModel._addMetadataColumnComponents(StaticSearchUIModel.java:860)
      	at org.ametys.cms.search.ui.model.StaticSearchUIModel._addColumnsComponents(StaticSearchUIModel.java:796)
      	at org.ametys.cms.search.ui.model.StaticSearchUIModel.configure(StaticSearchUIModel.java:186)
      	... 110 more
      Caused by: java.lang.IllegalArgumentException: A component for the role 'tags' is already registered on this ComponentManager.
      	at org.ametys.runtime.plugin.component.ThreadSafeComponentManager._addComponent(ThreadSafeComponentManager.java:286)
      	at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.addComponent(ThreadSafeComponentManager.java:274)
      	at org.ametys.cms.search.ui.model.StaticSearchUIModel._addMetadataColumnComponents(StaticSearchUIModel.java:854)
      	... 112 more
      

          [CMS-7506] Unable to use a system-ref and a metadata-ref with same name as result column of search tool

          indeed they all register in the same _searchColumnManager component manager

          Raphaël Franchet added a comment - indeed they all register in the same _searchColumnManager component manager

            Unassigned Unassigned
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: