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

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

    • 4.4 M2

      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 

       

          [CTYPEEDIT-118] Two "main" views are created for each new content type

          Magali Franchet made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Caroline Bayle made changes -
          Resolution New: Fixed [ 1 ]
          Sprint New: 4.4 M2 [ 48 ]
          Status Original: Ready to merge [ 10208 ] New: Resolved [ 5 ]
          Caroline Bayle made changes -
          Status Original: Code review OK [ 10206 ] New: Ready to merge [ 10208 ]
          Caroline Bayle made changes -
          Assignee New: Caroline Bayle [ cbayle ]
          Cédric Damioli made changes -
          Fix Version/s New: 1.3.0 [ 15605 ]
          Fix Version/s Original: 1.2.0 [ 15212 ]
          Caroline Bayle made changes -
          Status Original: Available for review [ 10005 ] New: Code review OK [ 10206 ]
          Julien Micheletti (Inactive) made changes -
          Status Original: Open [ 1 ] New: Available for review [ 10005 ]
          Julien Micheletti (Inactive) made changes -
          Comment [ Concernant la remarque 1, est ce que ça ne devrait pas faire l'objet d'un nouveau Jira ? Etant donné que celui là concerne la création d'un content type ]
          Caroline Bayle made changes -
          Link New: This issue Référence CTYPEEDIT-117 [ CTYPEEDIT-117 ]
          Loïc Bouchet made changes -
          Sprint Original: 4.3 RC4 [ 43 ]

            cbayle Caroline Bayle
            jmicheletti Julien Micheletti (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: