Uploaded image for project: 'ContentTypes Editor'
  1. ContentTypes Editor
  2. CTYPEEDIT-118

Two "main" views are created for each new content type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Sprint:
      4.4 M2

      Description

      When we create a new content type with the tool, an exception occured because of this. 

      <cms:metadata-set name="main" type="view" internal="false">
       <cms:label i18n="false">main</cms:label>
       </cms:metadata-set>
       <cms:metadata-set name="main" type="view" internal="false">
       <cms:label i18n="false">main</cms:label>
       </cms:metadata-set>

      How to reproduce : 

      • Integrator
      • Content types 
      • Select the "modification" menu
      • In the ribbon, click on the first "new" button
      • Fill the required fields of the form
      • Click OK 
      • Restart

      This exception occured : 

      Caused by: org.apache.avalon.framework.configuration.ConfigurationException: The view metadata-set 'main' is already defined. @file:///E:/Dev/Ametys/templates/odfweb/master/webapp/cms/WEB-INF/param/content-types/odf-web/Letest.xml:11:64Caused by: org.apache.avalon.framework.configuration.ConfigurationException: The view metadata-set 'main' is already defined. @file:///E:/Dev/Ametys/templates/odfweb/master/webapp/cms/WEB-INF/param/content-types/odf-web/Letest.xml:11:64 at org.ametys.cms.contenttype.AbstractContentTypeDescriptor._getApplicableMetadataSets(AbstractContentTypeDescriptor.java:260) at org.ametys.cms.contenttype.AbstractContentTypeDescriptor._configureMetadataSets(AbstractContentTypeDescriptor.java:226) at org.ametys.cms.contenttype.DefaultContentType.configure(DefaultContentType.java:401) 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.initialize(ThreadSafeComponentManager.java:206) ... 115 more

      In addition to the fix of this exception, we also renamed some variables so it's important to check if : 

      • The tree of CTYPEEDITOR still include attributes and views
      • We can create or edit attributes and views (without saving) and if the change is shown in the tree 

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbayle Caroline Bayle
                Reporter:
                jmicheletti Julien Micheletti
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: