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

Inheritance of widget-param doesn't work in content type declarations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • 4.5.13, 4.6.0
    • 4.4.1
    • None
    • None
    • 4.6 M9

      how to reproduce
      add a common content type in a plugin (example: web/plugins/single-media-contents.item-content.xml)
      add a another content type and extends the common (example web/plugins/single-media-contents.video.xml extends="plugin.single-media-contents.item-content")

      if you have the same metadata with just widget-params different he doesn't take it into account

      in the common xml :

             <cms:metadata name="attachment" type="file">
      	       	<label i18n="true">CONTENT_ITEM_CONTENT_ATTACHMENT</label>
      	       	<description i18n="true">CONTENT_ITEM_CONTENT_ATTACHMENT_DESC</description>
      	       	<validation>
                     <mandatory />
                 </validation>
                 <widget>edition.file</widget>
      			<widget-params>
      			     <param name="allowSources">external,resource</param>
      		</widget-params>
             </cms:metadata>
      

      in the other

      <extension xmlns:cms="http://www.ametys.org/schema/cms" class="org.ametys.web.contenttype.WebContentType">
      	<cms:content-type xmlns:cms="http://www.ametys.org/schema/cms" extends="plugin.single-media-contents.item-content"> 
      			
      	<!-- +
      		 | VIDEO
      		 + -->
      			
      		<cms:label i18n="true">CONTENT_VIDEO_LABEL</cms:label>
      		<cms:description i18n="true">CONTENT_VIDEO_DESCRIPTION</cms:description>
      		<cms:default-title i18n="true">CONTENT_VIDEO_DEFAULT_TITLE</cms:default-title>
      		<cms:icons>
      			<cms:glyph>ametysicon-movie16</cms:glyph>
      		</cms:icons>
      		<css>
                  <file plugin="core-ui">font/ametys/AmetysIcon.css</file>
               </css>
      		
      		<cms:right>Web_Right_Video_Create</cms:right>
      		
      		 <cms:metadata name="attachment" type="file">
      		       	<label i18n="true">CONTENT_VIDEO_ATTACHMENT</label>
      		       	<description i18n="true">CONTENT_VIDEO_ATTACHMENT_DESC</description>
      		       	<validation>
      	               <mandatory />
      	           </validation>
      				<widget>edition.file</widget>
                      <widget-params>
                          <param name="allowSources">external,resource</param>
                          <param name="allowExtensions">mp3,oga,ogg,wav</param>
                      </widget-params>
      	       </cms:metadata>
      	       
      	</cms:content-type>
      </extension>
      

            cbayle Caroline Bayle
            lbouziat Léa Bouziat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: