cancel
Showing results for 
Search instead for 
Did you mean: 

Faild to add custom content type

billwyuan
Champ in-the-making
Champ in-the-making
I am new to Alfresco enterprise version. I got Failed to add 'customSmiley Tongueressrelease' to the list of content types as the type is not recognised, a warning message is in alfresco.log.

To reproduce in windows Alfresoc version 4.2, put the three files here and restart server, new content or search has not new content,
C:\Alfresco\tomcat\shared\classes\alfresco\extension

customModel.xml:
<blockcode>
<?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: Press Release –>
      <type name="customSmiley Tongueressrelease">
         <title>Press Release</title>
         <parent>cm:content</parent>
         <properties>
            <property name="customSmiley TongueRName">
               <title>PR Person Name</title>
               <type>d:text</type>
            </property>
            <property name="customSmiley TongueREmail">
               <title>PR Person Email</title>
               <type>d:text</type>
            </property>
            <property name="customSmiley TongueRPhone">
               <title>PR Person Phone</title>
               <type>d:text</type>
            </property>
            <property name="customSmiley TongueRDate">
               <title>PR Released Date</title>
               <type>d:date</type>
            </property>
         </properties>
         <associations>
            <association name="customSmiley TongueRImage">
               <title>Press Release Image</title>
               <target>
                  <class>cm:content</class>
                  <mandatory>false</mandatory>
                  <many>false</many>
               </target>
            </association>
            <association name="customSmiley TongueRFiles">
               <title>Press Release Files</title>
               <target>
                  <class>cm:content</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </association>
         </associations>      
         <mandatory-aspects>
            <aspect>cm:versionable</aspect>
         </mandatory-aspects>
      </type>
     
   </types>

   <aspects>
     
      <!– Definition of new Content Aspect: Customer Details –>
      <aspect name="custom:CustomerDetails">
         <title>Customer Details</title>
         <properties>
            <property name="custom:CustomerName">
               <title>Customer Name</title>
               <type>d:text</type>
            </property>
            <property name="custom:CustomerContactName">
               <title>Customer Contact Name</title>
               <type>d:text</type>
            </property>
            <property name="custom:CustomerContactPhone">
               <title>Customer Contact Phone</title>
               <type>d:text</type>
            </property>
            <property name="custom:CustomerProjectID">
               <title>Customer Project ID</title>
               <type>d:int</type>
            </property>
            <property name="custom:NewCustomer">
               <title>New Customer</title>
               <type>d:boolean</type>
            </property>
         </properties>
      </aspect>
     
   </aspects>
        
</model>
</blockcode>

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

<beans>

    <!– Registration of new models –>   
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/customModel.xml</value>
            </list>
        </property>
    </bean>

</beans>
</blockcode>

web-client-config-custom.xml
<blockcode>
<alfresco-config>

   <!– English is the default language.  Add additional languages to the list in the login page –>
   <config evaluator="string-compare" condition="Languages">
      <languages>
         <language locale="de_DE">German</language>
         <language locale="es_ES">Spanish</language>
         <language locale="fr_FR">French</language>
         <language locale="it_IT">Italian</language>
         <language locale="ja_JP">Japanese</language>
      </languages>
   </config>

   <!– Example of adding a custom icon to the Create Space dialog –>
   <config evaluator="string-compare" condition="cm:folder icons">
      <icons>
         <icon name="space-icon-custom" path="/images/icons/space-icon-custom1.gif" />
      </icons>
   </config>

   <config>
      <client>
         <!– Override the from email address –>
         <from-email-address>munwar@cignex.com</from-email-address>

         <!– the minimum number of characters required for a valid search string –>
         <search-minimum>3</search-minimum>
        
         <!– set this value to true to enable AND text terms for simple/advanced search by default –>
         <search-and-terms>false</search-and-terms>
         
         <!– Limit search results. -1 for unlimited. –>
         <search-max-results>100</search-max-results>
      </client>    
   </config>

   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
            <type name="customSmiley Tongueressrelease" />
         </content-types>
         <custom-properties>
            <meta-data type="customSmiley Tongueressrelease" property="customSmiley TongueRDate" />
            <meta-data aspect="custom:CustomerDetails" property="custom:CustomerName" />
            <meta-data aspect="custom:CustomerDetails" property="custom:NewCustomer" />
         </custom-properties>
      </advanced-search>
   </config>

   <config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="customSmiley Tongueressrelease" />
      </content-types>
   </config>

   <config evaluator="node-type" condition="customSmiley Tongueressrelease">
      <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="customSmiley TongueRName" />
         <show-property name="customSmiley TongueREmail" />
         <show-property name="customSmiley TongueRPhone" />
         <show-property name="customSmiley TongueRDate" />
         <show-association name="customSmiley TongueRImage"/>
         <show-association name="customSmiley TongueRFiles"/>
      </property-sheet>
   </config>

   <!– Lists the custom aspect in business rules Action wizard –>
   <config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="custom:CustomerDetails"/>
      </aspects>
      <subtypes>
         <type name="customSmiley Tongueressrelease"/>
      </subtypes>     
   </config>

   <!– Displays the properties in view details page –>
   <config evaluator="aspect-name" condition="custom:CustomerDetails">
      <property-sheet>
         <separator name="sepCust1" display-label="Customer Details" component-generator="HeaderSeparatorGenerator" />
         <show-property name="custom:CustomerName"/>
         <show-property name="custom:CustomerContactName"/>
         <show-property name="custom:CustomerContactPhone"/>
         <show-property name="custom:CustomerProjectID"/>
         <show-property name="custom:NewCustomer"/>
      </property-sheet>
   </config>

   <config evaluator="string-compare" condition="Dashboards">
      <!– Dashboard layouts and available dashlets for the My Alfresco pages –>
      <dashboards>
         <dashlets>
            <!– Add additional dashlet for press releases –>
            <dashlet id="press-releases" label="Press Releases"
                  description="Lists Press Releases with URL"
                  jsp="/jsp/dashboards/dashlets/chapter11_press_releases.jsp" allow-narrow="true" />
         </dashlets>
      </dashboards>
   </config>

</alfresco-config>
</blockcode>
<blockcode>
09:43:56,346 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] No changes were made to the schema.
09:43:56,663 DEBUG [org.alfresco.repo.module] preRegister called. Server=com.sun.jmx.mbeanserver.JmxMBeanServer@2d92b996, name=log4j:logger=org.alfresco.repo.module
09:43:56,672 DEBUG [org.alfresco.repo.module.ModuleComponentHelper] preRegister called. Server=com.sun.jmx.mbeanserver.JmxMBeanServer@2d92b996, name=log4j:logger=org.alfresco.repo.module.ModuleComponentHelper
09:43:57,280 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Search' subsystem, ID: [Search, managed, solr]
09:43:57,633 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Search' subsystem, ID: [Search, managed, solr] complete
09:43:58,219 INFO  [org.alfresco.enterprise.repo.sync.SyncAdminServiceImpl] There is no key for cloud sync, cloud sync turned off
09:43:58,232 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'thirdparty' subsystem, ID: [thirdparty, default]
09:43:58,492 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'thirdparty' subsystem, ID: [thirdparty, default] complete
09:43:58,493 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'OOoDirect' subsystem, ID: [OOoDirect, default]
09:43:58,628 WARN  [org.alfresco.util.AbstractTriggerBean] Job openOfficeConnectionTesterTrigger is not enabled
09:43:58,991 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'OOoDirect' subsystem, ID: [OOoDirect, default] complete
09:43:58,991 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'OOoJodconverter' subsystem, ID: [OOoJodconverter, default]
09:44:01,091 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'OOoJodconverter' subsystem, ID: [OOoJodconverter, default] complete
09:44:01,093 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: C:\Alfresco\alf_data
09:44:01,105 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
09:44:01,790 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] No patches were required.
09:44:01,811 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 1 module(s).
09:44:01,853 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module 'org.alfresco.module.vti' version 1.2.
09:44:01,861 DEBUG [org.alfresco.repo.module.ModuleComponentHelper] Started module 'ModuleDetails[{module.version=1.2, module.description=Alfresco Vti Extension, module.id=org.alfresco.module.vti, module.repo.version.max=999, module.title=Vti, module.repo.version.min=0, module.installState=INSTALLED, module.installDate=2013-02-05T15:09:28.707-05:00}]' including 0components.
09:44:01,868 DEBUG [org.alfresco.repo.module.ModuleComponentHelper] Installed module found in distribution: org.alfresco.module.vti
09:44:01,869 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'fileServers' subsystem, ID: [fileServers, default]
09:44:02,789 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
09:44:03,045 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
09:44:03,109 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'fileServers' subsystem, ID: [fileServers, default] complete
09:44:03,109 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'imap' subsystem, ID: [imap, default]
09:44:03,409 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'imap' subsystem, ID: [imap, default] complete
09:44:03,409 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'email' subsystem, ID: [email, outbound]
09:44:03,502 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'email' subsystem, ID: [email, outbound] complete
09:44:03,502 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'email' subsystem, ID: [email, inbound]
09:44:24,639 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'email' subsystem, ID: [email, inbound] complete
09:44:24,639 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'googledocs' subsystem, ID: [googledocs, default]
09:44:24,756 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'googledocs' subsystem, ID: [googledocs, default] complete
09:44:24,756 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Subscriptions' subsystem, ID: [Subscriptions, default]
09:44:24,795 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Subscriptions' subsystem, ID: [Subscriptions, default] complete
09:44:24,797 INFO  [org.alfresco.repo.usage.UserUsageTrackingComponent] Disabled - clear non-missing user usages …
09:44:24,813 INFO  [org.alfresco.repo.usage.UserUsageTrackingComponent] Found 0 users to clear
09:44:24,813 INFO  [org.alfresco.repo.usage.UserUsageTrackingComponent] … cleared non-missing usages for 0 users
09:44:24,813 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Synchronization' subsystem, ID: [Synchronization, default]
09:44:24,964 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Synchronization' subsystem, ID: [Synchronization, default] complete
09:44:25,068 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_33-b03; maximum heap size 910.250MB
09:44:25,286 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco license: Mode ENTERPRISE granted to Trial User limited to 30 days expiring Thu Mar 07 00:00:00 EST 2013 (22 days remaining).
09:44:25,295 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Enterprise). Current version: 4.1.1 (.3 61) schema 5,115. Originally installed version: 4.1.1 (.3 61) schema 5,115.
09:44:25,296 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'ActivitiesFeed' subsystem, ID: [ActivitiesFeed, default]
09:44:25,520 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'ActivitiesFeed' subsystem, ID: [ActivitiesFeed, default] complete
09:44:25,521 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Replication' subsystem, ID: [Replication, default]
09:44:25,549 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Replication' subsystem, ID: [Replication, default] complete
09:44:27,598 INFO  [org.alfresco.module.vti.VtiServer] Vti server started successfully on port: 7070
09:44:27,598 INFO  [org.alfresco.module.vti.VtiServer] Vti server SessionIdManagerWorkerName: jetty1
09:44:40,142 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 502 Web Scripts (+0 failed), 784 URLs
09:44:40,142 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 2 Package Description Documents (+0 failed)
09:44:40,142 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 1 Schema Description Documents (+0 failed)
09:44:40,148 INFO  [org.springframework.extensions.webscripts.AbstractRuntimeContainer] Initialised Repository Web Script Container (in 12491.908ms)
09:44:40,168 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
09:44:40,170 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
09:49:44,507 WARN  [org.alfresco.web.bean.LoginBean] Security violation. Unable to redirect to external location:
09:49:50,887 WARN  [org.alfresco.web.ui.repo.component.UISearchCustomProperties] No Type Definition found for: customSmiley Tongueressrelease - Was an Aspect expected?
09:49:50,887 WARN  [org.alfresco.web.ui.repo.component.UISearchCustomProperties] No Aspect Definition found for: custom:CustomerDetails - Was a Type expected?
09:49:50,887 WARN  [org.alfresco.web.ui.repo.component.UISearchCustomProperties] No Aspect Definition found for: custom:CustomerDetails - Was a Type expected?
09:50:02,221 WARN  [org.alfresco.web.bean.content.BaseContentWizard] Failed to add 'customSmiley Tongueressrelease' to the list of content types as the type is not recognised
09:50:14,438 WARN  [org.alfresco.web.bean.content.BaseContentWizard] Failed to add 'customSmiley Tongueressrelease' to the list of content types as the type is not recognised
09:50:17,393 WARN  [org.alfresco.web.bean.content.BaseContentWizard] Failed to add 'customSmiley Tongueressrelease' to the list of content types as the type is not recognised
</blockcode>
6 REPLIES 6

abarisone
Star Contributor
Star Contributor
Hi,
could you please provide your alfresco.log and edit your post in order to put your files between blockcode tag and make it more readable?
Thanks.

Regards,
Andrea

billwyuan
Champ in-the-making
Champ in-the-making
I am stuck on the custom model. It does not recognize any models I added.

billwyuan
Champ in-the-making
Champ in-the-making
Resolved

vassilisx
Champ in-the-making
Champ in-the-making
I would also be interested in knowing how you resolved your problem!

sdatla
Champ in-the-making
Champ in-the-making
I am having similar problem.How did you resolve your problem?

abarisone
Star Contributor
Star Contributor
Hi,
could you please tell us what was wrong and how did you resolved it?

Regards,
Andrea