cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Type fails on Custom Types

michaelmtz
Champ in-the-making
Champ in-the-making
Hello,

Version : 4.0.e  (cent-os & mac)

Followed Jeff Potts brillant article to build custom content model.   The Custom Types are displaying where they should.
The problem is when I change  a documents custom type,  I can only change it a couple times,  then I get the following message:

Unable to change type of document 'name-of-doc.pdf'

Here is the mdModel.xml config:

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="md:materialsdesignmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>Materials Design Model</description>
   <author>Michael Martinez</author>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other models –>
   <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 –>
   <namespaces>
      <namespace uri="http://www.materialsdesign.com/model/content/1.0" prefix="md" />
   </namespaces>

   <types>
      <!– Enterprise-wide generic document type –>
      <type name="md:doc">
         <title>Materials Design Document</title>
         <parent>cm:content</parent>
         <associations>
            <association name="md:relatedDocuments">
               <title>Related Documents</title>
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>md:doc</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </association>
         </associations>
      </type>

      <type name="md:legal">
         <title>MaterialsDesign Legal</title>
         <parent>md:doc</parent>
      </type>
      <type name="md:invoice">
         <title>MaterialsDesign Invoice</title>
         <parent>md:doc</parent>
      </type>
      <type name="md:expensereport">
         <title>MaterialsDesign Expense Report</title>
         <parent>md:doc</parent>
      </type>
      <type name="md:financial">
         <title>MaterialsDesign Financial</title>
         <parent>md:doc</parent>
      </type>
      <type name="md:financial3year">
         <title>MaterialsDesign Financial 3 year</title>
         <parent>md:financial</parent>
      </type>
      <type name="md:financial7year">
         <title>MaterialsDesign Financial 7 year</title>
         <parent>md:financial</parent>
      </type>

   </types>

   <aspects>
      <aspect name="md:productRelated">
         <title>Materials Design Product Metadata</title>
         <properties>
            <property name="md:product">
               <type>d:text</type>
               <mandatory>false</mandatory>
            </property>            
            <property name="md:version">
               <type>d:text</type>
               <mandatory>false</mandatory>
            </property>
         </properties>
      </aspect>   
   </aspects>
</model>

Here is the share-custom-config.xml code, I suspect this is the config that is incorrect.

<alfresco-config>
   <!– Document Library config section –>
   <config evaluator="string-compare" condition="DocumentLibrary">
      <!–
         Used by the "Manage Aspects" action

         For custom aspects, remember to also add the relevant i18n string(s)
            cm_myaspect=My Aspect
      –>
      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="sc:webable" />
            <aspect name="sc:productRelated" />           
            <aspect name="md:productRelated" />           
         </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>

      <!–
         Used by the "Change Type" action

         Define valid subtypes using the following example:
            <type name="cm:content">
               <subtype name="cm:mysubtype" />
            </type>

         Remember to also add the relevant i18n string(s):
            cm_mysubtype=My SubType
      –>
      <types>
             <type name="cm:content">
                <subtype name="sc:doc" />
                <subtype name="sc:whitepaper" />
             </type>
             <type name="sc:doc">
                <subtype name="sc:whitepaper" />
             </type>
             <type name="cm:content">
                <subtype name="md:doc" />
                <subtype name="md:expensereport" />
                <subtype name="md:financial" />
                <subtype name="md:financial3year" />
                <subtype name="md:financial7year" />
                <subtype name="md:invoice" />
                <subtype name="md:legal" />
             </type>
             <type name="md:doc">
                <subtype name="md:expensereport" />
                <subtype name="md:financial" />
                <subtype name="md:financial3year" />
                <subtype name="md:financial7year" />
                <subtype name="md:invoice" />
                <subtype name="md:legal" />
             </type>
             <type name="md:financial">
                <subtype name="md:doc" />
                <subtype name="md:expensereport" />
                <subtype name="md:financial3year" />
                <subtype name="md:financial7year" />
                <subtype name="md:invoice" />
                <subtype name="md:legal" />
             </type>
             <type name="md:legal">
                <subtype name="md:doc" />
                <subtype name="md:expensereport" />
                <subtype name="md:financial" />
                <subtype name="md:financial3year" />
                <subtype name="md:financial7year" />
                <subtype name="md:invoice" />
             </type>

      </types>
   </config>
  
</alfresco-config>

Just need to be pointed in the right direction.

Thanks in Advance.

Michael Mtz
3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Hello,

can you provide some output from the alfresco.log / catalina.out? Usually, the reason for the failure can be found there. Your configuration files appear to be in order as far as I can tell.

Regards
Axel

michaelmtz
Champ in-the-making
Champ in-the-making
Hello,

Hello,

can you provide some output from the alfresco.log / catalina.out? Usually, the reason for the failure can be found there. Your configuration files appear to be in order as far as I can tell.

Regards
Axel

When I reproduce the error.  No log files get updated.  
( I tailed the file (catalinia.out),  nothing updates,  I also listed all the files in the log directory, sorted by time.   Nothing was updated.) 

Relevant to this:  Is there a way to display the document type for each document on the Document List
or Document Details.   (Just point me in the right direction. )
Perhaps I should make ask that question in a new post.  (Did not find an answer while searching the forums)

Thanks

Michael

michaelmtz
Champ in-the-making
Champ in-the-making
Hello,
Found the answer to question below here:

https://forums.alfresco.com/en/viewtopic.php?f=47&t=43660#p128214


Relevant to this: Is there a way to display the document type for each document on the Document List
or Document Details. (Just point me in the right direction. )
Perhaps I should make ask that question in a new post. (Did not find an answer while searching the forums)