AnsweredAssumed Answered

Form not found on Create Content action in Share

Question asked by reynanuy on Jan 16, 2014
Latest reply on Jan 17, 2014 by reynanuy
Hello. I've been working with Alfresco for some time and I thought I had it a little figured it out at least, however this last problem has forced to seek help here, because it has resisted my advances for a number of days already. I have a content type working wonderfully on Alfresco, but when I want to have it work with Share, I get a FormNotFoundException; specifically when I try to create an instance of the type. It's strange because I've based it on several other types that were defined exactly alike and are working just fine. Anyways here is my code and the exact error:

<strong>ERROR [scripts.forms.FormUIGet] [http-127.0.0.1-8080-6] org.alfresco.repo.forms.FormNotFoundException: 001625619 A form could not be found for item: [type]im:docExpSIME</strong>

<strong>Type definition on the XML model file:</strong>

<type name="im:docExpSIME">
   <title>Documento de Expediente SIME</title>
   <description>Un documento que compone un expediente SIME</description>
   <parent>cm:content</parent>
   <properties>
      <property name="im:docExpSIMEExpediente">
         <title>Expediente</title>
         <type>d:text</type>
         <mandatory>true</mandatory>
      </property>
      <property name="im:docExpSIMEFecha">
         <title>Fecha</title>
         <type>d:date</type>
         <mandatory>true</mandatory>
      </property>
      <property name="im:docExpSIMECategoria">
         <title>Categoría</title>
         <type>d:text</type>
         <mandatory>true</mandatory>
         <multiple>true</multiple>
         <constraints>
            <constraint ref="im:docExpSIMECategoriaLista" />
         </constraints>
      </property>
      <property name="im:docExpSIMEConcepto">
         <title>Conceptos</title>
         <type>d:text</type>
         <mandatory>true</mandatory>
         <multiple>true</multiple>
         <constraints>
            <constraint ref="im:docExpSIMEConceptoLista" />
         </constraints>
      </property>
      <property name="im:docExpSIMEMatricula">
         <title>Matrícula</title>
         <type>d:text</type>
      </property>
   </properties>
   <mandatory-aspects>
      <aspect>im:archivoIM</aspect>
   </mandatory-aspects>
</type>


<strong>Working definiton on web-client-config-custom.xml:</strong>

<config evaluator="node-type" condition="im:docExpSIME" replace="true">
   <property-sheet>
      <show-property name="cm:name" show-in-view-mode="false" show-in-edit-mode="true" />
      <show-property name="im:docExpSIMEExpediente" />
      <show-property name="im:docExpSIMEFecha" />
      <show-property name="im:docExpSIMECategoria" />
      <show-property name="im:docExpSIMEConcepto" />
      <show-property name="im:docExpSIMEMatricula" />
      <show-property name="im:notas" />
   </property-sheet>
</config>


<strong>NON WORKING definiton on share-config-custom.xml:</strong>

   <config evaluator="string-compare" condition="DocumentLibrary" replace="true">
      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="im:archivoIM" />
         </visible>
         <!– Aspects that a user can add. Same as "visible" if left empty –>
         <addable>
         </addable>
         <!– Aspects that a user can remove. Same as "visible" if left empty –>
         <removeable>
         </removeable>
      </aspects>
      <types>
         <type name="cm:content">
            <subtype name="im:docExpSIME" />
         </type>
      </types>
      <create-content>
         <content id="docExpSIME" mimetype="text/plain" label="Documento de Expediente SIME" itemid="im:docExpSIME"/>
      </create-content>      
   </config>
   <config evaluator="node-type" condition="im:docExpSIME">
      <forms>
         <form>
            <!– Formulario de edición por defecto–>
            <field-visibility>
               <show id="cm:name"/>
               <show id="im:docExpSIMEExpediente" />
               <show id="im:docExpSIMEFecha" />
               <show id="im:docExpSIMECategoria" />
               <show id="im:docExpSIMEConcepto" />
               <show id="im:docExpSIMEMatricula" />
               <show id="im:notas" />
            </field-visibility>
         </form>
      </forms>
   </config>

   <config evaluator="model-type" condition="im:docExpSIME">
      <forms>
         <form> <!– Formulario de creación por defecto–>
            <field-visibility>
               <show id="cm:name"/>
               <show id="im:docExpSIMEExpediente" />
               <show id="im:docExpSIMEFecha" />
               <show id="im:docExpSIMECategoria" />
               <show id="im:docExpSIMEConcepto" />
               <show id="im:docExpSIMEMatricula" />
               <show id="im:notas" />
            </field-visibility>
         </form>

         <form id="search"> <!– Formulario de búsqueda por defecto –>
            <field-visibility>
               <show id="cm:name"/>
               <show id="im:docExpSIMEExpediente" />
               <show id="im:docExpSIMEFecha" />
               <show id="im:docExpSIMECategoria" />
               <show id="im:docExpSIMEConcepto" />
               <show id="im:docExpSIMEMatricula" />
               <show id="im:notas" />
            </field-visibility>
            <appearance>
               <field id="im:docExpSIMECategoria">
                  <control template="/org/alfresco/components/form/controls/selectmany.ftl" />
               </field>
               <field id="im:docExpSIMEConcepto">
                  <control template="/org/alfresco/components/form/controls/selectmany.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>

   <config replace="true" evaluator="string-compare" condition="AdvancedSearch">
      <advanced-search>
         <!– Forms for the advanced search type list –>
         <forms>
            <form label="Documento de Expediente SIME" description="Documento de un Expediente SIME">im:docExpSIME</form>
         </forms>
      </advanced-search>
   </config>



*The aspect definition is there as well, with other types that are working. I just omitted those so the code is more clear, besides there is really 0 chance they are the cause of the problem.

Outcomes