cancel
Showing results for 
Search instead for 
Did you mean: 

Overriding wcmquickstart-form-config.xml

mizage
Champ in-the-making
Champ in-the-making
I am trying to override some fields (ws:sectionConfig in ws:section)  in the wcmquickstart-form-config.xml. When I modify this file, it works fine. But when I try to override ws:sectionConfig by putting the change in share-config-custom.xml, it does not pick up the change. I can add new a field and it picks them up, but when I change the ws:sectionConfig it fails. There are no errors in the log and the other modifications present in share-config-custom.xml are there. It just ignores the one change to ws:sectionConfig.

Any ideas?
14 REPLIES 14

bremmington
Champ on-the-rise
Champ on-the-rise
Nothing immediately springs to mind as to what might cause that. Perhaps if you would paste the changes you're making to each of the files here then that would help. Exactly which version are you on?

mizage
Champ in-the-making
Champ in-the-making
We are using 3.4.4.
Here is the share-config-custom.xml. So the wsSmiley FrustratedectionConfig changes are not showing up while
ws:indexPage changes are showing. This seems a bit strange to me.


<alfresco-config>
   <!– Global config section –>
   <config replace="true">
      <flags>
         <!–
            Developer debugging setting to turn on DEBUG mode for client scripts in the browser
         –>
         <client-debug>true</client-debug>

         <!–
            LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
            This flag automatically activates logging on page load.
         –>
         <client-debug-autologging>false</client-debug-autologging>
      </flags>

      <!– header block copied from share-config.xml so that we may override –>
      <header>
         <app-items>
            <!– defaults: icon="{id}.png" label="header.{id}.label" description="header.{id}.description" –>
            <item type="link" id="my-dashboard">{userdashboardpage}</item>
            <item type="js" id="sites">Alfresco.module.Sites</item>
            <item type="link" id="people">/people-finder</item>
            <item type="link" id="repository">/repository</item>
            <item type="container" id="more">
               <container-group id="my">
                  <item type="link" id="my-tasks">/my-tasks</item>
                  <item type="link" id="my-workflows">/my-workflows</item>
                  <item type="link" id="my-content">/user/user-content</item>
                  <item type="link" id="my-sites">/user/user-sites</item>
                  <item type="link" id="my-profile">{userprofilepage}</item>
                  <item type="js" id="saved-searches" condition="false">Alfresco.module.SavedSearches</item>
               </container-group>
               <container-group id="tools" permission="admin">
                  <item type="link" id="application">/console/admin-console/application</item>
                  <item type="link" id="groups">/console/admin-console/groups</item>
                  <item type="link" id="replication-jobs">/console/admin-console/replication-jobs</item>
                  <item type="link" id="repository">/console/admin-console/repository</item>
                  <item type="link" id="users">/console/admin-console/users</item>
               </container-group>
            </item>
         </app-items>
         <user-items>
            <item type="container" id="user" icon="" description="">
               <container-group id="usermenu" label="">
                  <item type="user" id="status">{userprofilepage}</item>
                  <item type="link" id="my-profile">{userprofilepage}</item>
                  <item type="link" id="change-password" condition="user.capabilities.isMutable">/user/change-password</item>
                  <item type="external-link" id="help">{share-help}</item>
                  <item type="link" id="logout" condition="!context.externalAuthentication">/dologout</item>
               </container-group>
            </item>
            <item type="external-link" id="help" icon="">{share-help}</item>
         </user-items>
         <dependencies>
            <css src="/modules/create-site.css" />
            <css src="/modules/header/sites.css" />
            <js src="/modules/create-site.js" />
            <js src="/modules/header/sites.js" />
         </dependencies>
      </header>
   </config>

   <!– config copied from wcmquickstart-form-config.xml so that we may override –>
   <config evaluator="node-type" condition="ws:article">
      <forms>
         <!– Default form configuration for the cm:content type –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:author" force="true" />
               <show id="cm:creator" for-mode="view" />
               <show id="cm:created" for-mode="view" />
               <show id="cm:modifier" for-mode="view" />
               <show id="cm:modified" for-mode="view" />

               <show id="ws:templateName" force="true" />

            <show id="ws:lastModifiedDate" for-mode="edit" force="true" />
           
               <show id="mimetype" for-mode="view" />
               <show id="size" for-mode="view" />

               <!– tags and categories –>
               <show id="cm:taggable" for-mode="edit" force="true" />
               <show id="cm:categories" />

               <!– ws:webasset aspect –>
               <show id="ws:derivedCommentCount" for-mode="view" />
               <show id="ws:derivedAverageRating" for-mode="view" />
               <show id="ws:publishedTime" for-mode="view" />

               <!– cm:dublincore aspect –>
               <show id="cm:publisher" />
               <show id="cm:contributor" />
               <show id="cm:type" />
               <show id="cm:identifier" />
               <show id="cm:dcsource" />
               <show id="cm:coverage" />
               <show id="cm:rights" />
               <show id="cm:subject" />

               <!– cm:complianceable aspect –>
               <show id="cm:removeAfter" />

               <!– cm:effectivity aspect –>
               <show id="cm:from" />
               <show id="cm:to" />

               <!–  cm:summarizable aspect –>
               <show id="cm:summary" />

               <!– cm:translatable aspect –>
               <show id="cm:translations" />

               <!– cm:localizable aspect –>
               <show id="cm:locale" />

               <!– cm:ownable aspect –>
               <show id="cm:owner" />

               <!– cm:attachable aspect –>
               <show id="cm:attachments" />

               <!– cm:emailed aspect –>
               <show id="cm:originator" />
               <show id="cm:addressee" />
               <show id="cm:addressees" />
               <show id="cm:sentdate" />
               <show id="cm:subjectline" />

               <show id="ws:primaryImage" />
               <show id="ws:secondaryImage" />
               <show id="ws:relatedArticles" />

            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:description">
                  <control>
                     <control-param name="activateLinks">true</control-param>
                  </control>
               </field>
            <field id="ws:lastModifiedDate" set="uscis-custom" />
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="size">
                  <control template="/org/alfresco/components/form/controls/size.ftl" />
               </field>
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>
               <field id="cm:categories">
                  <control>
                     <control-param name="compactMode">true</control-param>
                  </control>
               </field>
               <field id="cm:originator" read-only="true" />
               <field id="cm:addressee" read-only="true" />
               <field id="cm:addressees" read-only="true" />
               <field id="cm:sentdate" read-only="true" />
               <field id="cm:subjectline" read-only="true" />
               <field id="ws:primaryImage" >
                    <control>
                        <control-param name="startLocation">{doclib}</control-param>
                    </control>
               </field>
               <field id="ws:secondaryImage" >
                    <control>
                        <control-param name="startLocation">{doclib}</control-param>
                    </control>
               </field>
               <field id="ws:relatedArticles" >
                    <control>
                        <control-param name="startLocation">{doclib}</control-param>
                    </control>
               </field>
            </appearance>
         </form>

         <!– Document Library pop-up Edit Metadata form –>
         <form id="doclib-simple-metadata">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <!– tags and categories –>
               <show id="cm:taggable" for-mode="edit" force="true" />
               <show id="cm:categories" />
            </field-visibility>
            <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:description">
                  <control>
                     <control-param name="activateLinks">true</control-param>
                  </control>
               </field>
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>
               <field id="cm:categories">
                  <control>
                     <control-param name="compactMode">true</control-param>
                  </control>
               </field>
            </appearance>
         </form>

         <!– Document Library Inline Edit form –>
         <form id="doclib-inline-edit">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                     <control-param name="forceEditor">true</control-param>
                  </control>
               </field>
            </appearance>
         </form>
      </forms>
    </config>
  
    <!– config copied from wcmquickstart-form-config.xml so that we may override –>
   <config evaluator="node-type" condition="ws:indexPage">
      <forms>
         <!– Default form configuration for the ws:indexPage type –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:author" force="true" />
               <show id="cm:creator" for-mode="view" />
               <show id="cm:created" for-mode="view" />
               <show id="cm:modifier" for-mode="view" />
               <show id="cm:modified" for-mode="view" />
               
               <!– Custom fields –>
               <show id="ws:relatedLinks" for-mode="edit" force="true" />
               <show id="ws:lastModifiedDate" for-mode="edit" force="true" />
                           
               <show id="ws:templateName" force="true" />

               <show id="size" for-mode="view" />
               <show id="mimetype" for-mode="view" />

               <!– tags and categories –>
               <show id="cm:taggable" for-mode="edit" force="true" />
               <show id="cm:categories" />

               <!– ws:webasset aspect –>
               <show id="ws:derivedCommentCount" for-mode="view" />
               <show id="ws:derivedAverageRating" for-mode="view" />
               <show id="ws:publishedTime" for-mode="view" />

               <!– cm:dublincore aspect –>
               <show id="cm:publisher" />
               <show id="cm:contributor" />
               <show id="cm:type" />
               <show id="cm:identifier" />
               <show id="cm:dcsource" />
               <show id="cm:coverage" />
               <show id="cm:rights" />
               <show id="cm:subject" />

               <!– cm:complianceable aspect –>
               <show id="cm:removeAfter" />

               <!– cm:effectivity aspect –>
               <show id="cm:from" />
               <show id="cm:to" />

               <!–  cm:summarizable aspect –>
               <show id="cm:summary" />

               <!– cm:translatable aspect –>
               <show id="cm:translations" />

               <!– cm:localizable aspect –>
               <show id="cm:locale" />

               <!– cm:ownable aspect –>
               <show id="cm:owner" />

               <!– cm:attachable aspect –>
               <show id="cm:attachments" />

               <!– cm:emailed aspect –>
               <show id="cm:originator" />
               <show id="cm:addressee" />
               <show id="cm:addressees" />
               <show id="cm:sentdate" />
               <show id="cm:subjectline" />

            </field-visibility>
            <appearance>
               <set id="" appearance="panel" />
               <set id="uscis-custom" appearance="panel" label="USCIS Custom Fields" />
               
               <field id="cm:name">
                  <control template="/org/alfresco/components/form/controls/readonly.ftl" />
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:description">
                  <control>
                     <control-param name="activateLinks">true</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="size">
                  <control template="/org/alfresco/components/form/controls/size.ftl" />
               </field>
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>
               <field id="cm:categories">
                  <control>
                     <control-param name="compactMode">true</control-param>
                  </control>
               </field>
               <field id="cm:originator" read-only="true" />
               <field id="cm:addressee" read-only="true" />
               <field id="cm:addressees" read-only="true" />
               <field id="cm:sentdate" read-only="true" />
               <field id="cm:subjectline" read-only="true" />
               
               <field id="ws:lastModifiedDate" set="uscis-custom" />

               <field id="ws:relatedLinks" set="uscis-custom">
                  <control>
                     <control-param name="startLocation">{doclib}</control-param>
                  </control>
               </field>
            
            </appearance>
         </form>

         <!– Document Library pop-up Edit Metadata form –>
         <form id="doclib-simple-metadata">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <!– tags and categories –>
               <show id="cm:taggable" for-mode="edit" force="true" />
               <show id="cm:categories" />
            </field-visibility>
            <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
            <appearance>
               <field id="cm:name">
                  <control template="/org/alfresco/components/form/controls/readonly.ftl" />
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:description">
                  <control>
                     <control-param name="activateLinks">true</control-param>
                  </control>
               </field>
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>
               <field id="cm:categories">
                  <control>
                     <control-param name="compactMode">true</control-param>
                  </control>
               </field>
            </appearance>
         </form>

         <!– Document Library Inline Edit form –>
         <form id="doclib-inline-edit">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="ws:relatedLinks" for-mode="edit" force="true" />
               <show id="ws:lastModifiedDate" for-mode="edit" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:name">
                  <control template="/org/alfresco/components/form/controls/readonly.ftl" />
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                     <control-param name="forceEditor">true</control-param>
                  </control>
               </field>
            
               <field id="ws:relatedLinks">
                  <control>
                     <control-param name="startLocation">{doclib}</control-param>
                  </control>
               </field>
            </appearance>
         </form>
      </forms>
   </config>

    <config evaluator="node-type" condition="ws:section">
      <forms>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="ws:excludeFromNavigation" />
               <show id="ws:sectionConfig" />
               <show id="ws:inheritRenditionConfig" />
               <show id="ws:renditionConfig" />
               <show id="ws:orderIndex" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="ws:sectionConfig">
                  <!–control template="/org/alfresco/components/form/controls/textarea.ftl" /–>
               <control template="/gov/uscis/components/form/controls/sectiontype.ftl" >
                  <control-param name="options">
                     |Inherit Parent
                     ~
                     cmis:document=baseTemplate,ws:indexPage=homepage,ws:article=articlepage4|Home Page
                     ~
                     ws:indexPage=reverse_chrono_page,ws:article=articlepage4|Reverse Chrono Sort
                  </control-param>
               </control>
               </field>
           
               <field id="ws:renditionConfig">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
            </appearance>
         </form>
         <form id="doclib-simple-metadata">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="ws:excludeFromNavigation" />
               <show id="ws:sectionConfig" />
               <show id="ws:inheritRenditionConfig" />
               <show id="ws:renditionConfig" />
               <show id="ws:orderIndex" force="true" />
            </field-visibility>
            <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="ws:sectionConfig">
                  <!–control template="/org/alfresco/components/form/controls/textarea.ftl" /–>
               <control template="/gov/uscis/components/form/controls/sectiontype.ftl" >
                  <control-param name="options">
                     ''|Inherit Parent
                     ~
                     cmis:document=baseTemplate,ws:indexPage=homepage,ws:article=articlepage4|Home Page
                     ~
                     ws:indexPage=reverse_chrono_page,ws:article=articlepage4|Reverse Chrono Sort
                  </control-param>
               </control>
               </field>
               <field id="ws:renditionConfig">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>

   <config evaluator="string-compare" condition="WebFramework">
      <web-framework>
         <!– SpringSurf Autowire Runtime Settings –>
         <!–
              Developers can set mode to 'development' to disable; SpringSurf caches,
              FreeMarker template caching and Rhino JavaScript compilation.
         –>
         <autowire>
            <!– Pick the mode: "production" or "development" –>
            <mode>development</mode>
         </autowire>
      </web-framework>
   </config>

   <!– Repository Library config section –>
   <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
      <!–
      Whether the link to the Repository Library appears in the header component or not.
      –>
      <visible>false</visible>
   </config>


</alfresco-config>

bremmington
Champ on-the-rise
Champ on-the-rise
Thanks. Please would you paste "/gov/uscis/components/form/controls/sectiontype.ftl" here too? I'm not an expert on configuring forms, but I know a man who is. I'll see if I can pick his brain. This may be something odd to do with multi-value properties.

bremmington
Champ on-the-rise
Champ on-the-rise
I've picked his brain. Actually the favourite explanation is not to do with the form config itself, but with the order in which the config is being loaded. It's possible (even likely) that the wcmquickstart-form-config.xml is being loaded after your share-config-custom.xml, and therefore obliterating your changes.

Here's a suggestion. If you don't already have one, create a Spring context file in "alfresco/web-extension/" relative to your classpath (in the same folder as your share-config-custom.xml file). In that context file, add this bean definition:

   <bean id="myCustomShareConfig" class="org.springframework.extensions.config.ConfigBootstrap" init-method="register" depends-on="wcmquickstart.custom.config">
      <property name="configService" ref="web.config" />
      <property name="configs">
         <list>
            <value>classpath:alfresco/my-wcmquickstart-form-config.xml</value>
         </list>
      </property>
   </bean>
Move your WQS form customisations out of alfresco/my-wcmquickstart-form-config.xml and into "alfresco/my-wcmquickstart-form-config.xml". See if that makes your changes appear.

mizage
Champ in-the-making
Champ in-the-making
Ok we have a new wrinkle. A team member took the ws:sectionConfig code and copied it to a new field defined as ws:test within ws:section. This field shows up correctly (html dropdown and all). So we are wondering whether this is an issue with how ws:sectionConfig is loaded and that no matter what we put in the  share-config-custom.xml for this field, it gets overriden by what is in wcmquickstart-form-config.xml.

Here is the new share-config-custom.xml snippet:


<config evaluator="node-type" condition="ws:section" replace="true">
      <forms>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="ws:excludeFromNavigation" />
               <show id="ws:sectionConfig" force="true" />
               <show id="ws:inheritRenditionConfig" />
               <show id="ws:renditionConfig" />
               <show id="ws:orderIndex" force="true" />
               <show id="ws:lastModifiedDate" for-mode="edit" force="true" />
               <show id="ws:test" for-mode="edit" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="ws:sectionConfig">
                  <control template="/gov/uscis/components/form/controls/sectiontype.ftl" >
                     <control-param name="options">
                        |Inherit Parent
                        ~
                        cmis:document=baseTemplate,ws:indexPage=homepage,ws:article=articlepage4|Home Page
                        ~
                        ws:indexPage=reverse_chrono_page,ws:article=articlepage4|Reverse Chrono Sort
                     </control-param>
                  </control>
               </field>
               
               <field id="ws:renditionConfig">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
<!–this part shows up correctly—>               
               <field id="ws:test">
                  <control template="/gov/uscis/components/form/controls/sectiontype.ftl" >
                     <control-param name="options">
                        |Inherit Parent
                        ~
                        cmis:document=baseTemplate,ws:indexPage=homepage,ws:article=articlepage4|Home Page
                        ~
                        ws:indexPage=reverse_chrono_page,ws:article=articlepage4|Reverse Chrono Sort
                     </control-param>
                  </control>
               </field>
            </appearance>
         </form>

As I said earlier, when I modify the wcmquickstart-form-config.xml it works fine, but we want to avoid modifying the core code.

sectiontype.ftl:


<#include "/org/alfresco/components/form/controls/common/utils.inc.ftl" />

<#assign optionSeparator="~">
<#assign labelSeparator="|">

<div class="form-field">
   <#if form.mode == "view">
      <div class="viewmode-field">
         <#if field.mandatory && !(field.value?is_number) && field.value?string == "">
            <span class="incomplete-warning"><img src="${url.context}/res/components/form/images/warning-16.png" title="${msg("form.field.incomplete")}" /><span>
         </#if>
         <span class="viewmode-label">${field.label?html}:</span>
         <#if field.value?string == "">
            <#assign valueToShow=msg("form.control.novalue")>
         <#else>
            <#assign valueToShow=field.value>
            <#list field.control.params.options?split(optionSeparator) as nameValue>
               <#if nameValue?index_of(labelSeparator) == -1>
                  <#if nameValue == field.value?string || (field.value?is_number && field.value?c == nameValue)>
                     <#assign valueToShow=nameValue>
                     <#break>
                  </#if>
               <#else>
                  <#assign choice=nameValue?split(labelSeparator)>
                  <#if choice[0] == field.value?string || (field.value?is_number && field.value?c == choice[0])>
                     <#assign valueToShow=msgValue(choice[1])>
                     <#break>
                  </#if>
               </#if>
            </#list>
         </#if>
         <span class="viewmode-value">${valueToShow?html}</span>
      </div>
   <#else>
      <label for="${fieldHtmlId}">${field.label?html}:<#if field.mandatory><span class="mandatory-indicator">${msg("form.required.fields.marker")}</span></#if></label>
      <#if field.control.params.options?? && field.control.params.options != "">
         <select id="${fieldHtmlId}" name="${field.name}" tabindex="0"
               <#if field.description??>title="${field.description}"</#if>
               <#if field.control.params.size??>size="${field.control.params.size}"</#if>
               <#if field.control.params.styleClass??>class="${field.control.params.styleClass}"</#if>
               <#if field.control.params.style??>style="${field.control.params.style}"</#if>
               <#if field.disabled  && !(field.control.params.forceEditable?? && field.control.params.forceEditable == "true")>disabled="true"</#if>>
              
               <#list field.control.params.options?split(optionSeparator) as nameValue>
              
                  <#if nameValue?index_of(labelSeparator) == -1>
                     <option value="${nameValue?html}"<#if nameValue == field.value?string || (field.value?is_number && field.value?c == nameValue)> selected="selected"</#if>>${nameValue?html}</option>
                  <#else>
                      <#assign choice=nameValue?split(labelSeparator)>
                     <option value="${choice[0]?html}"<#if choice[0]?trim == field.value> selected="selected"</#if>>${msgValue(choice[1])?html}</option>
                  </#if>
               </#list>
         </select>
         <@formLib.renderFieldHelp field=field />
      <#else>
         <div id="${fieldHtmlId}" class="missing-options">${msg("form.control.selectone.missing-options")}</div>
      </#if>
   </#if>
</div>

bremmington
Champ on-the-rise
Champ on-the-rise

mizage
Champ in-the-making
Champ in-the-making
Will give it a go. Thanks!

mizage
Champ in-the-making
Champ in-the-making
So I created/performed the following:

In the shared/classes/alfresco/extension folder I created a file named my-wcmquickstart-form-config.xml and moved the ws:section and ws:indexPage config from share-config-custom.xml to this new file.

In the shared/classes/alfresco/web-extension folder, I created a file named custom-slingshot-application-context.xml and added the <bean id="myCustomShareConfig" …> xml from the ticket to this file.  I changed the classpath value to "alfresco/extension/my-wcmquickstart-form-config.xml" to match the above file location.

After restarting, I see the exact same output as before.  Template Mapping is unchanged and I see my custom "Bin Test" drop down.

custom-slingshot-application-context.xml


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

   <bean id="myCustomShareConfig" class="org.springframework.extensions.config.ConfigBootstrap"
      init-method="register" depends-on="wcmquickstart.custom.config">
      <property name="configService" ref="web.config" />
      <property name="configs">
         <list>
            <value>classpath:alfresco/extension/my-wcmquickstart-form-config.xml</value>
         </list>
      </property>
   </bean>

</beans>

my-wcmquickstart-form-config.xml:


<alfresco-config>

   <config evaluator="node-type" condition="ws:section" replace="true">
      <forms>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="ws:excludeFromNavigation" />
               <show id="ws:sectionConfig" force="true" />
               <show id="ws:inheritRenditionConfig" />
               <show id="ws:renditionConfig" />
               <show id="ws:orderIndex" force="true" />
               <show id="ws:lastModifiedDate" for-mode="edit" force="true" />
               <show id="ws:binTest" for-mode="edit" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="ws:sectionConfig">
                  <control template="/gov/uscis/components/form/controls/sectiontype.ftl" >
                     <control-param name="options">
                        |Inherit Parent
                        ~
                        cmis:document=baseTemplate,ws:indexPage=homepage,ws:article=articlepage4|Home Page
                        ~
                        ws:indexPage=reverse_chrono_page,ws:article=articlepage4|Reverse Chrono Sort
                     </control-param>
                  </control>
               </field>
               
               <field id="ws:renditionConfig">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
               
               <field id="ws:binTest">
                  <control template="/gov/uscis/components/form/controls/sectiontype.ftl" >
                     <control-param name="options">
                        |Inherit Parent
                        ~
                        cmis:document=baseTemplate,ws:indexPage=homepage,ws:article=articlepage4|Home Page
                        ~
                        ws:indexPage=reverse_chrono_page,ws:article=articlepage4|Reverse Chrono Sort
                     </control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <form id="doclib-simple-metadata">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="ws:excludeFromNavigation" />
               <show id="ws:sectionConfig" force="true" />
               <show id="ws:inheritRenditionConfig" />
               <show id="ws:renditionConfig" />
               <show id="ws:orderIndex" force="true" />
            </field-visibility>
            <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               
               <field id="ws:sectionConfig">
                  <control template="/gov/uscis/components/form/controls/sectiontype.ftl" >
                     <control-param name="options">
                        |Inherit Parent
                        ~
                        cmis:document=baseTemplate,ws:indexPage=homepage,ws:article=articlepage4|Home Page
                        ~
                        ws:indexPage=reverse_chrono_page,ws:article=articlepage4|Reverse Chrono Sort
                     </control-param>
                  </control>
               </field>
               
               <field id="ws:renditionConfig">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>
   
   <!– config copied from wcmquickstart-form-config.xml so that we may override –>
   <config evaluator="node-type" condition="ws:indexPage">
      <forms>
         <!– Default form configuration for the ws:indexPage type –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:author" force="true" />
               <show id="cm:creator" for-mode="view" />
               <show id="cm:created" for-mode="view" />
               <show id="cm:modifier" for-mode="view" />
               <show id="cm:modified" for-mode="view" />

               <!– Custom fields –>
               <show id="ws:relatedLinks" for-mode="edit" force="true" />
               <show id="ws:lastModifiedDate" for-mode="edit" force="true" />

               <show id="ws:templateName" force="true" />

               <show id="size" for-mode="view" />
               <show id="mimetype" for-mode="view" />

               <!– tags and categories –>
               <show id="cm:taggable" for-mode="edit" force="true" />
               <show id="cm:categories" />

               <!– ws:webasset aspect –>
               <show id="ws:derivedCommentCount" for-mode="view" />
               <show id="ws:derivedAverageRating" for-mode="view" />
               <show id="ws:publishedTime" for-mode="view" />

               <!– cm:dublincore aspect –>
               <show id="cm:publisher" />
               <show id="cm:contributor" />
               <show id="cm:type" />
               <show id="cm:identifier" />
               <show id="cm:dcsource" />
               <show id="cm:coverage" />
               <show id="cm:rights" />
               <show id="cm:subject" />

               <!– cm:complianceable aspect –>
               <show id="cm:removeAfter" />

               <!– cm:effectivity aspect –>
               <show id="cm:from" />
               <show id="cm:to" />

               <!–  cm:summarizable aspect –>
               <show id="cm:summary" />

               <!– cm:translatable aspect –>
               <show id="cm:translations" />

               <!– cm:localizable aspect –>
               <show id="cm:locale" />

               <!– cm:ownable aspect –>
               <show id="cm:owner" />

               <!– cm:attachable aspect –>
               <show id="cm:attachments" />

               <!– cm:emailed aspect –>
               <show id="cm:originator" />
               <show id="cm:addressee" />
               <show id="cm:addressees" />
               <show id="cm:sentdate" />
               <show id="cm:subjectline" />

            </field-visibility>
            <appearance>
               <set id="" appearance="panel" />
               <set id="uscis-custom" appearance="panel" label="USCIS Custom Fields" />

               <field id="cm:name">
                  <control template="/org/alfresco/components/form/controls/readonly.ftl" />
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:description">
                  <control>
                     <control-param name="activateLinks">true</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="size">
                  <control template="/org/alfresco/components/form/controls/size.ftl" />
               </field>
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>
               <field id="cm:categories">
                  <control>
                     <control-param name="compactMode">true</control-param>
                  </control>
               </field>
               <field id="cm:originator" read-only="true" />
               <field id="cm:addressee" read-only="true" />
               <field id="cm:addressees" read-only="true" />
               <field id="cm:sentdate" read-only="true" />
               <field id="cm:subjectline" read-only="true" />

               <field id="ws:lastModifiedDate" set="uscis-custom" />

               <field id="ws:relatedLinks" set="uscis-custom">
                  <control>
                     <control-param name="startLocation">{doclib}</control-param>
                  </control>
               </field>

               <!–
               <field id="ws:bintest" set="uscis-custom">
                  <control template="/gov/uscis/components/form/controls/my-textfield.ftl" />
               </field>
               –>
            </appearance>
         </form>

         <!– Document Library pop-up Edit Metadata form –>
         <form id="doclib-simple-metadata">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <!– tags and categories –>
               <show id="cm:taggable" for-mode="edit" force="true" />
               <show id="cm:categories" />
            </field-visibility>
            <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
            <appearance>
               <field id="cm:name">
                  <control template="/org/alfresco/components/form/controls/readonly.ftl" />
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:description">
                  <control>
                     <control-param name="activateLinks">true</control-param>
                  </control>
               </field>
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>
               <field id="cm:categories">
                  <control>
                     <control-param name="compactMode">true</control-param>
                  </control>
               </field>
            </appearance>
         </form>

         <!– Document Library Inline Edit form –>
         <form id="doclib-inline-edit">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="ws:relatedLinks" for-mode="edit" force="true" />
               <show id="ws:lastModifiedDate" for-mode="edit" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:name">
                  <control template="/org/alfresco/components/form/controls/readonly.ftl" />
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                     <control-param name="forceEditor">true</control-param>
                  </control>
               </field>

               <field id="ws:relatedLinks">
                  <control>
                     <control-param name="startLocation">{doclib}</control-param>
                  </control>
               </field>
            </appearance>
         </form>
      </forms>
   </config>

</alfresco-config>

bremmington
Champ on-the-rise
Champ on-the-rise
Oh. That's unfortunate. Please would you modify a line in the log4j.properties file in the Share webapp (<web container>/webapps/share/WEB-INF/classes/log4j.properties). Change:
log4j.logger.org.alfresco.config=warn
so that it becomes:
log4j.logger.org.alfresco.config=debug
Then restart Share at let me know what appears in the log file.