AnsweredAssumed Answered

metadata templates : Absorb failed, verify dependencies

Question asked by raaftjon on Mar 16, 2012
Latest reply on Mar 23, 2012 by raaftjon
I want to create custom metadata templates for the documentLibrary.
I use Alfresco 4.0.d

share-config-custom.xml
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
   <metadata-templates>
      <template id="my-template-test">
         <evaluator>my.evaluator.doclib.metadata.hasCategories</evaluator>
         <line index="10" id="firstLine">{date}{size}</line>
      </template>
   </metadata-templates>
   …
</config>
After restart of Alfresco a error occurred if I go to the documentLibrary:
02160001 Failed to execute script 'classpath*:alfresco/site-webscripts/org/alfresco/components/documentlibrary/data/surf-doclist.get.js': 02160000 Error: Absorb failed, verify dependencies. (file:/system/alfresco/alfresco-4.0.d-test/apache-tomcat-6.0.35/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/documentlibrary/data/surf-doclist.get.js#775)
If I add the default metadata template to my share-config-custom.xml, the documentLibrary works fine:

share-config-custom.xml
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
   <metadata-templates>
      <!– Default (fallback) –>
      <template id="default">
         <line index="10" id="date">{date}{size}</line>
         <line index="20" id="description" view="detailed">{description}</line>
         <line index="30" id="tags" view="detailed">{tags}</line>
         <line index="40" id="categories" view="detailed" evaluator="evaluator.doclib.metadata.hasCategories">{categories}</line>
         <line index="50" id="social" view="detailed">{social}</line>
      </template>
      <template id="my-template-test">
         <evaluator>my.evaluator.doclib.metadata.hasCategories</evaluator>
         <line index="10" id="firstLine">{date}{size}</line>
      </template>
   </metadata-templates>
   …
</config>
Is absolutely necessary that I have to specify the default template in my share-config-custom.xml?
Also the other templates from Alfresco like isWorkingCopy, dictionaryModel etc. lack.
Is there a way to just add my template?

Thanks.

Outcomes