cancel
Showing results for 
Search instead for 
Did you mean: 

Form not found on Create Content action in Share

reynanuy
Champ in-the-making
Champ in-the-making
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.
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
Few issue I see with your share-config-custom.xml

First
remove replace="true" from following tag

<config evaluator="string-compare" condition="DocumentLibrary" replace="true">


then Add appearance tag below "field-visibility" closing tag where you need to define the possible values of the property with constrain.

Third
Add one more form under "node-type" config which will be replication of existing form but with id="doclib-simple-metadata"


reynanuy
Champ in-the-making
Champ in-the-making
Hi mitpatoliya. Thanks a lot for answering my plead for help. So, I did as you asked: removed the replace="true" for the DocumentLibrary and updated the type definitions as instructed. The only thing is that I am using a constraint for the fields defined in the XML for the model, as I've as done with other types in the past; thus I don't need to define the list of valid values in the appearance tag of the definition. In any case still no luck with this, it gives the same error as before. Below is the new definition for the node-type and model-type:


   <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>
            <appearance>
               <field id="cm:name" mandatory="true"/>
               <field id="im:docExpSIMEExpediente"  mandatory="true"/>
               <field id="im:docExpSIMEFecha"  mandatory="true"/>
               <field id="im:docExpSIMECategoria"  mandatory="true"/>
               <field id="im:docExpSIMEConcepto"  mandatory="true"/>
               <field id="im:docExpSIMEMatricula" />
               <field id="im:notas" />
            </appearance>            
         </form>
         <form id="doclib-simple-metadata">
            <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="cm:name" mandatory="true"/>
               <field id="im:docExpSIMEExpediente"  mandatory="true"/>
               <field id="im:docExpSIMEFecha"  mandatory="true"/>
               <field id="im:docExpSIMECategoria"  mandatory="true"/>
               <field id="im:docExpSIMEConcepto"  mandatory="true"/>
               <field id="im:docExpSIMEMatricula" />
               <field id="im:notas" />
            </appearance>               
         </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>
            <appearance>
               <field id="cm:name" mandatory="true"/>
               <field id="im:docExpSIMEExpediente"  mandatory="true"/>
               <field id="im:docExpSIMEFecha"  mandatory="true"/>
               <field id="im:docExpSIMECategoria"  mandatory="true"/>
               <field id="im:docExpSIMEConcepto"  mandatory="true"/>
               <field id="im:docExpSIMEMatricula" />
               <field id="im:notas" />
            </appearance>   
         </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>

mitpatoliya
Star Collaborator
Star Collaborator
It should be like this



<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>
            <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>
         <form id="doclib-simple-metadata">
            <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 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>
            <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>
         <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>

reynanuy
Champ in-the-making
Champ in-the-making
I am sorry to report that this didn't work, I am still getting that damn error message: org.alfresco.repo.forms.FormNotFoundException: 002347085 A form could not be found for item: [type]im:docExpSIME
At this point I certainly don't know what really is wrong with this definition, specially given the fact that I have several like it, working already without problems in Share. In any case, if anyone has any other suggestion to try, I would more than welcome them.