1
votes

I have installed Alfresco 4.2c from the .bin installed in Ubuntu Server 12.04LTS

I've followed ecmarchitect.com "Working with custom content types" 2nd edition to create a new content type.

So I have created the following files:

All in /opt/alfresco-4.2.c/tomcat/webapps:

  • /share/WEB-INF/classes/alfresco/web-extension/share-config-custom.xml
  • /alfresco/WEB-INF/classes/alfresco/extension/mypro-model-context.xml
  • /alfresco/WEB-INF/classes/alfresco/extension/model/apModel.xml

All created with just a very basic example like in the guide. Then I did "sudo service alfresco restart" and when I login to Share as Admin, I can't see my custom content types and aspects in the rules.

Also I can't create any custom content in the document libraries.

Is there anything else I need to do? How could I start to debug the reason?

4
Can you paste your share-config-custom.xml somewhere? Other than via the rules/aspects pages where else in the UI do you want your types and aspects to show up? - Will Abson

4 Answers

2
votes

page 24: Put your equivalent form config in share-config-custom.xml

<config evaluator="aspect" condition="sc:webable">
<forms>
<form>
<field-visibility>
<show id="sc:published" />
<show id="sc:isActive" />
</field-visibility>
<appearance>
<field id="sc:published" label-id="prop.sc_published" />
<field id="sc:isActive" label-id="prop.sc_isActive" />
</appearance>
</form>
</forms>
</config>

for types use evaluator "node-type"

1
votes

you should configure your share-config-custom.xml file:

  <aspects>
     <!-- Aspects that a user can see -->
     <visible>
        <aspect name="cm:generalclassifiable" />
        <aspect name="cm:complianceable" />
        <aspect name="cm:dublincore" />
        <aspect name="cm:effectivity" />
        <aspect name="cm:summarizable" />
        <aspect name="cm:versionable" />
        <aspect name="cm:templatable" />
        <aspect name="cm:emailed" />
        <aspect name="emailserver:aliasable" />
        <aspect name="cm:taggable" />
        <aspect name="app:inlineeditable" />
        <aspect name="custom:customAspect" />
     </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>

1
votes

Your problem most probably is related to the location of your custom files. You shouldn't mess with files under /WEB-INF. Check at this blog post for more: http://www.fossoffice.com/en/2013/05/01/custom-types-and-aspects-in-alfresco-4-2-c/

0
votes

How could I start to debug the reason?

Try to create a Text content type. Then try to change the type of this item to your custom type. I found that I was able to do this, before being able to create the custom type directly from the drop down.

This will at least tell you if Alfresco knows about your custom type.