AnsweredAssumed Answered

problem creating custom content model

Question asked by developer.researcher on Dec 20, 2010
Latest reply on Jun 23, 2011 by jmartorell
Hello,

     I am trying create a custom model for alfresco (community edition 3.3). When I create a custom space (based on cm:folder) works fine but when I create a custom content (based on cm:content) I can not see it (select it) into the content creation wizard. At the time of content creation, the log shows:

17:38:07,220 User:admin WARN  [bean.content.BaseContentWizard] Failed to add 'ccm:mycontent' to the list of content types as the type is not recognised.

     What could be causing this error? How I can fix it? I hope someone can help me

     My configuration files are:

1. customContentModel.xml

<?xml version="1.0" encoding="UTF-8"?>

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

   <description>Custom Content Model</description>  
   <version>1.0</version>

   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>

   <namespaces>
      <namespace uri="model.customcontent" prefix="ccm"/>
   </namespaces>

  <types>
   <type name="ccm:mycontent">
      <title>Expedient</title>
      <parent>cm:content</parent>
      <properties>
         <property name="ccm:Area">
            <title>Area</title>
         <description>Name of Area</description>
            <type>d:text</type>
         </property>
         <property name="ccm:Priority">
            <title>Priority</title>
         <description>Priority of Expedient</description>
            <type>d:text</type>
         </property>        
      </properties>
   </type>
  </types>

  <aspects>
  </aspects>
</model>

2. customContentModel-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="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/customContentModel.xml</value>
            </list>
        </property>
    </bean>  
</beans>

3. web-client-config-custom.xml

<alfresco-config>
  
   <config evaluator="string-compare" condition="Action Wizards">
          <subtypes>             
         <type name="ccm:mycontent"/>
          </subtypes>
   </config>
  
   <config evaluator="string-compare" condition="Action Wizards">
          <especialise-types>
              <type name="ccm:mycontent"/>
          </especialise-types>
   </config>
  
   <config evaluator="string-compare" condition="Content Wizards">     
     <content-types>
               <type name="ccm:mycontent" />
          </content-types>
   </config>
  
   <config evaluator="node-type" condition="ccm:mycontent">
      <property-sheet>
         <show-property name="ccm:Area"/>
         <show-property name="ccm:Priority"/>        
      </property-sheet>
   </config>

</alfresco-config>

Thanks in advance,

Outcomes