cancel
Showing results for 
Search instead for 
Did you mean: 

Custom aspects properties non displaying

doc_alf
Champ in-the-making
Champ in-the-making
Hi all,

I customized Alfresco with new custom aspects in order to define several types of documents with custom properties. Then I implemented rules so that custom aspects are automatically added to content when I add a new document in a specific space. I did some tests and it all worked fine.

But a week ago, for a reason I have not figured yet, Alfresco wouldn't display the custom properties anymore when I add a document. Only the Alfresco default properties are displayed and I cannot see my custom properties.

There is no error in the log file (even by augmenting the log level) and my two configuration files seem to be well read when I start the server.

If anybody has any idea, please help me.

Thank you very much.
8 REPLIES 8

pjcaracuel
Champ in-the-making
Champ in-the-making
Hi,

Can you post web-client-config-custom.xml and you model file xml?

REgards

neilfrost
Champ in-the-making
Champ in-the-making
Hi I too am having the same issue.

My custom model is called ORS_schemas.xml and is below:

<?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/ORS_schemas.xml</value>
            </list>
        </property>
    </bean>
         
</beans>

My custom-model-context.xml file is:

<?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/ORS_schemas.xml</value>
            </list>
        </property>
    </bean>
         
</beans>


My web-client-custom-config.xml is
  
<alfresco-config>
<config evaluator="string-compare" condition="Content Wizards">
      <content-types>
   <type name="ORS:standard" />
      </content-types>
   </config>

   <config evaluator="aspect-name" condition="ORS:standard_Aspect">
      <property-sheet>
         <show-property name="ORS:objectbarcode"/>
         </property-sheet>
   </config>
</alfresco-config>

Am I missing something?

Thanks
Neil

pjcaracuel
Champ in-the-making
Champ in-the-making
Hi,

And the ORSModel.xml???

Regards

neilfrost
Champ in-the-making
Champ in-the-making
I don't have one, just the ORS_Schemas.xml.

Is that what I am missing?

Neil

neilfrost
Champ in-the-making
Champ in-the-making
Sorry, here's the ORS_Schemas.xml

<?xml version="1.0" encoding="utf-8"?>

<model name="ORS:schemas" xmlns="http://www.alfresco.org/model/dictionary/1.0">

  <!– Optional meta-data about the model –>
  <description>ORS Schemas</description>
  <author></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 –>
  <!– NOTE: The following namespace my.new.model should be changed to reflect your own namespace –>

  <namespaces>
    <namespace uri="ORS" prefix="ORS"/>
  </namespaces>

<types>


    <type name="ORS:standard">
      <title>ORS standard Schema</title>
      <parent>cm:content</parent>
        <mandatory-aspects>
           <aspect>ORS:standard_Aspect</aspect>
      </mandatory-aspects>
    </type>

  </types>

  <aspects>

    <aspect name="ORS:standard_Aspect">
      <title>Standard MOPS Fields</title>
      <properties>
        <property name="ORS:objectbarcode">
     <type>d:text</type>
        </property>
      </properties>
    </aspect>


  </aspects>

</model>

pjcaracuel
Champ in-the-making
Champ in-the-making
Include this code in your web-client-config-custom.xml


<config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="ORS:standard_Aspect"/>
      </aspects>
</config>
<config evaluator="string-compare" condition="Action Wizards">
      <subtypes>
        <type name="ORS:standard" />
      </subtypes>
   </config>
   <config evaluator="string-compare" condition="Action Wizards">
    <specialise-types>
           <type name="ORS:standard" />
      </specialise-types>
   </config>

neilfrost
Champ in-the-making
Champ in-the-making
Hi

I've added that and I get an error in the alfresco.log

14:07:18,037 WARN  [org.alfresco.web.bean.content.BaseContentWizard] Failed to add 'ORS:standard' to the list of content types as the type is not recognised

My web-client-config-custom.xml now looks like this:

<alfresco-config>


<config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="ORS:standard_Aspect"/>
      </aspects>
</config>

<config evaluator="string-compare" condition="Action Wizards">
      <subtypes>
        <type name="ORS:standard" />
      </subtypes>
   </config>

   <config evaluator="string-compare" condition="Action Wizards">
    <specialise-types>
           <type name="ORS:standard" />
      </specialise-types>
   </config> 
    <config evaluator="string-compare" condition="Content Wizards">
      <content-types>
   <type name="ORS:standard" />
      </content-types>
   </config>



   <config evaluator="aspect-name" condition="ORS:standard_Aspect">
      <property-sheet>
         <show-property name="ORS:objectbarcode"/>
         </property-sheet>
   </config>

</alfresco-config>

pjcaracuel
Champ in-the-making
Champ in-the-making
Try it,

Rename ORS_Schemas.xml to ORSModel.xml

Rename custom-model-context.xml to ORS-context.xml

This is a best practique with alfresco. The error like that your custom type haven't been updated.

Regards