cancel
Showing results for 
Search instead for 
Did you mean: 

metadata templates : Absorb failed, verify dependencies

raaftjon
Champ on-the-rise
Champ on-the-rise
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.
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
You need to remove the
replace="true"
attribute, which is causing existing templates to be removed.

Thanks,
Mike

raaftjon
Champ on-the-rise
Champ on-the-rise
hello Mike

Yes, that was the solution. Now it works very well.

Thank you Mike