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

A fieldset cannot be defined into a composite or a repeater

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.2.1, 4.3.0
    • 4.2.0
    • None
    • None
    • 4.2.1

      I have fieldsets defined to display and edit my content correctly, they are defined into my metadata set like this :

      <cms:metadata-ref name="adresse">
          <cms:fieldset role="fieldset">
              <cms:label i18n="false">Adresse</cms:label>
              <cms:metadata-ref name="numero" />
              <cms:metadata-ref name="typeVoie" />
              <cms:metadata-ref name="nomVoie" />
              <cms:metadata-ref name="commune" />
              <cms:metadata-ref name="codePostal" />
          </cms:fieldset>
          <cms:fieldset role="fieldset">
              <cms:label i18n="false">Coordonnées numériques</cms:label>
              <cms:metadata-ref name="web" />
              <cms:metadata-ref name="telephone" />
              <cms:metadata-ref name="fax" />
              <cms:metadata-ref name="courriel" />
          </cms:fieldset>
          <cms:fieldset role="fieldset">
              <cms:label i18n="false">Coordonnées GPS</cms:label>
              <cms:metadata-ref name="gps" />
          </cms:fieldset>
      </cms:metadata-ref>

      In this example, adresse is a composite, so maybe I can separate each groups (but I'm not sure that multiple metadata-ref with the same name are supported). But if I have the same case (and it is) in a repeater, it's a real problem.

      Here is the logs of the cause :

      Caused by: org.apache.avalon.framework.configuration.ConfigurationException: The group 'adresse' can't contain something else than model view items, configured with 'metadata-ref' elements. [myFile]:[line]:[column]
      at org.ametys.cms.contenttype.DefaultContentType._parseModelViewItem(DefaultContentType.java:1185)
      at org.ametys.cms.contenttype.DefaultContentType._fillViewItems(DefaultContentType.java:1111)
      at org.ametys.cms.contenttype.DefaultContentType._parseView(DefaultContentType.java:1085)
      at org.ametys.cms.contenttype.DefaultContentType._parseViews(DefaultContentType.java:1052)
      at org.ametys.cms.contenttype.DefaultContentType._configureViews(DefaultContentType.java:996)
      at org.ametys.cms.contenttype.DefaultContentType.configure(DefaultContentType.java:376)
      at org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:202)
      at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.configureAndStart(ThreadSafeComponentManager.java:359)
      at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.newInstance(ThreadSafeComponentManager.java:378)
      at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:138)
      ... 102 more

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

              Created:
              Updated:
              Resolved: