cancel
Showing results for 
Search instead for 
Did you mean: 

Add a custom content type in Windows vs Centos

jenn_l
Champ on-the-rise
Champ on-the-rise
Hoi all,

I want to add a custom content type in Alfresco installed on CentOS.The web-client-config-custom.xml and customModel.xml both works fine in a windows operating system, where Alfresco3.0 is installed. There are no errors when tomcat starts. The type is added and I can also search in the "advanced search". I've transfered these two files into CentOS where Alfresco3.1 is installed. When tomcat starts I get a warning message saying:
15:35:26,038 User:admin WARN [bean.content.BaseContentWizard] Failed to add 'custom:tctdocument' to the list of content types as the type is not recognised
I also make sure that the permissions and the owner of the file are set correctly. In CentOS it doesn't even work when I type the .xml on my own.
My web-client-config-custom.xml looks like this:
<alfresco-config>
<config evaluator="string-compare" condition="Languages" >
      <languages>
     <!– <language locale="nl_BE">Nederlands (Belgie)</language> –>
      <language locale="nl_NL">Nederlands</language>
      </languages>
      </config>
<config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
         <type name="custom:tctdocument"/>
    </content-types>
         <custom-properties>
         <meta-data type="custom:tctdocument" property="custom:Afzender"/>
         <meta-data type="custom:tctdocument" property="custom:AangetekendDatum"/>
         <meta-data type="custom:tctdocument" property="custom:DatumBinnenkomst"/>
         <meta-data type="custom:tctdocument" property="custom:OrigineelNummStuk"/>
         <meta-data type="custom:tctdocument" property="custom:KorteInhoud"/>
         <meta-data type="custom:tctdocument" property="custom:NaarWie"/>
         <meta-data type="custom:tctdocument" property="custom:Towho"/>
         <meta-data type="custom:tctdocument" property="custom:VerzendDatum"/>
         <meta-data type="custom:tctdocument" property="custom:Aantekening"/>
         <meta-data type="custom:tctdocument" property="custom:Referentie"/>
         <meta-data type="custom:tctdocument" property="custom:Bijlagen"/>
         <meta-data type="custom:tctdocument" property="custom:DatumBinnenkomst"/>
             
          <!–  <meta-data aspect="app:simpleworkflow" property="app:approveStep" />
–>
         </custom-properties>
      </advanced-search>
   </config>
 
<!– the following code ensures that the properties are available to edit in the edit properties window for tct content –>
<config evaluator="node-type" condition="custom:tctdocument">
   <property-sheet>
      <show-property name="mimetype"
         display-label-id="content_type"
         component-generator="MimeTypeSelectorGenerator"/>

      <show-property name="size"
         display-label-id="size"
         converter="org.alfresco.faces.ByteSizeConverter"
         show-in-edit-mode="false"/>

      <show-property name="custom:Afzender"/>
      <show-property name="custom:AangetekendDatum"/>
      <show-property name="custom:DatumBinnenkomst"/>
      <show-property name="custom:OrigineelNummStuk"/>
      <show-property name="custom:KorteInhoud"/>
      <show-property name="custom:NaarWie"/>
      <show-property name="custom:Towho"/>
      <show-property name="custom:VerzendDatum"/>
      <show-property name="custom:Aantekening"/>
      
<show-property name="custom:Referentie"/>
      <show-property name="custom:Bijlagen"/>

   </property-sheet>

</config>

 
<!– The following code ensures that the tct document content type is listed when you create new content –>
<config evaluator="string-compare" condition="Content Wizards">
   <content-types>
      <type name="custom:tctdocument"/>
   </content-types>
</config>


<!– List the custom aspect in business rules Action wizard –>

<config evaluator="string-compare" condition="Action Wizards">


   
   <aspects>

   <aspect name="custom:DocumentID"/>

   </aspects>
   
   <subtypes>
      <type name="custom:tctdocument"/>
   </subtypes>

</config>


</alfresco-config>



My customModel.xml looks like the following:
<?xml version="1.0" encoding="UTF-8"?>

<!– Custom Model –>

<!– Note: This model is pre-configured to load at startup of the Repository.  So, all custom –>
<!–       types and aspects added here will automatically be registered –>

<model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>  
   <description>Custom Model</description>
   <author></author>
   <version>1.0</version>

   <imports>
        <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
   <namespaces>
      <namespace uri="custom.model" prefix="custom"/>
   </namespaces>
  
  
<types>
   <!–Definition of new content type for TCT: TCT Document –>
   <type name="custom:tctdocument">
   <title>TCT Document</title>
   <parent>cm:content</parent>         
   <properties>
      <property name="custom:Afzender">
            <title>Afzender</title>
            <type>d:text</type>
      </property>
      
      <property name="custom:AangetekendDatum">
            <title>Aangetekend datum van het stuk</title>
            <type>d:date</type>
      </property>
      
      <property name="custom:DatumBinnenkomst">
            <title>Datum binnenkomst</title>
            <type>d:date</type>
      </property>
      
      <property name="custom:OrigineelNummStuk">
            <title>Extern nummer</title>
            <type>d:int</type>
      </property>
      
      <property name="custom:KorteInhoud">
            <title>Korte inhoud</title>
            <type>d:text</type>
      </property>
      
      <property name="custom:NaarWie">
            <title>Intern Naar wie verzonden</title>
            <type>d:text</type>
      </property>
      
      <property name="custom:Towho">
            <title>Extern Naar wie verzonden</title>
            <type>d:text</type>
      </property>
      
      <property name="custom:VerzendDatum">
            <title>Verzend datum</title>
            <type>d:date</type>
      </property>
      
      <property name="custom:Aantekening">
            <title>Aantekening</title>
            <type>d:text</type>
      </property>
      
      <property name="custom:Referentie">
            <title>Referentie naar andere stukken</title>
            <type>d:text</type>
      </property>
      
      <property name="custom:Bijlagen">
            <title>Aantal Bijlagen</title>
            <type>d:int</type>
      </property>

   </properties>
   
   <mandatory-aspects>
   <aspect>cm:versionable</aspect>
   </mandatory-aspects>
   
   </type>
  
</types>
  
  
<!–
   <aspects>
      <aspect name="custom:DocumentID">
      <title>Document ID</title>
      <properties>
         <property name="custom:DocumentID">
         <title>Document ID</title>
         <type>d:text</type>
         </property>
      </properties>
      </aspect>
      
      <aspect name="custom:status">
      <title>Status</title>
      <properties>
         <property name="custom:status">
         <title>Status</title>
         <type>d:text</type>
         </property>
      </properties>
      </aspect>

      
   </aspects>
   –>
     
</model>

Is there someone who can help me?
Thanks!
1 REPLY 1

jenn_l
Champ on-the-rise
Champ on-the-rise
Hoi all,

I 've figured it out in the meantime!!!  Smiley Very Happy The custom-model-context.xml was not 'activated' by default. After you've installed Alfresco, It has .sample as an extension (custom-model-context.xml.sample)

Thank you for reading.