cancel
Showing results for 
Search instead for 
Did you mean: 

change to shared/classes/alfresco/web-extension/share-config-custom.xml does not do anything

eltorio
Champ in-the-making
Champ in-the-making
Hi,
I'm new to Alfresco, I've installed Alfresco Community 4.2c on linux under Tomcat7
I changed tomcat/conf/catalina.properties for having shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
When I change aspect visibility in ${catalina.base}/shared/classes/alfresco/web-extension/share-config-custom.xml with:

      <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="gd:googleEditable" />
            <aspect name="cm:geographic" />
            <aspect name="exif:exif" />
         </visible>

I still have all the aspect in the share UI, in fact my real problem is that I cannot add my custom test aspect <aspect name="customSmiley Very HappyocumentComptable" /> developped with the 2 ex sample files:
${catalina.base}/shared/classes/alfresco/extension/custom-model-context.xml
${catalina.base}/shared/classes/alfresco/extension/customModel.xml

for testing if my new xml files are read I made a intentional mistake in the xml doc, and it works I got an error on tomcat starting.
I also force adding ${catalina.base}/shared/classes in tomcat classpath by adding a setenv.sh,
my classpass reported by tomcat is


Using CATALINA_BASE:   /java/tomcat
Using CATALINA_HOME:   /java/tomcat
Using CATALINA_TMPDIR: /java/tomcat/temp
Using JRE_HOME:        /java/jdk1.7.0_11/jre
Using CLASSPATH:       /java/tomcat/shared/classes/:/java/tomcat/bin/bootstrap.jar:/java/tomcat/bin/tomcat-juli.jar


wich is correct for my installation

Thanks everyone for your help
15 REPLIES 15

eltorio
Champ in-the-making
Champ in-the-making
I've tried under tomcat 6.0.37 with same result. I'm probably make a big obvious mistake but I'm a real newbie!

I just tried by adding a new aspect (<aspect name="zpe:docLoggable"/>) with 3 other already existing aspects as under in

   <config evaluator="string-compare" condition="DocumentLibrary">
         <aspects>
          <!–
            Aspects that a user can see in UI.
            Used by Rules, aspects are the listed aspects for rule's "has-aspect" action condition.
          –>
          <visible>
            <aspect name="cm:generalclassifiable" />
            <aspect name="cm:complianceable" />
            <aspect name="cm:dublincore" />
            <aspect name="zpe:docLoggable"/>
          </visible>
       </aspects>
   </config>


and here is the result in attached image -

eltorio
Champ in-the-making
Champ in-the-making
I tried like sujaypillai without any success I still have no change at all

   <!– Document Library config section –>
   <config evaluator="string-compare" condition="DocumentLibrary" replace="true">

      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="custom:DocumentComptable" />
         </visible>
      </aspects>
   </config>

and all the original aspects are shown but not my custom one

mitpatoliya
Star Collaborator
Star Collaborator
try after removing replace="true" attribute from your config tag.

rjohnson
Star Contributor
Star Contributor
First be sure you have the evaluator="string-compare" condition="DocumentLibrary" set in your config section for your aspects and I urge you not to have replace="true"

Make sure that you have empty <addable></addable> and <removable></removeable> tags in the config sections.

Make sure that your aspect definition has been included. You would put the aspect deinition in the "extension" directory in a file called {your-extension-name}-model.xml and you must tell Alfresco to include it in a file called {your-extension-context-name}-model-context.xml. I often forget to add the new model files to the model-context.xml!

If you have done all that it should work. It does for me.

eltorio
Champ in-the-making
Champ in-the-making
It still does not work,
Thank you for your help,
this is my config file it is located at
/java/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml
CATALINA_HOME=/java/tomcat
tomcat is 7.0.34
jre is 1.7.0.11
in catalina.properties I change
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

<alfresco-config>

   <!– Repository Library config section –>
   <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
      <!–
         Whether the link to the Repository Library appears in the header component or not.
      –>
      <visible>true</visible>
   </config>

   <config evaluator="string-compare" condition="Remote">
      <remote>
         <endpoint>
            <id>alfresco-noauth</id>
            <name>Alfresco - unauthenticated access</name>
            <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>none</identity>
         </endpoint>

         <endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>user</identity>
         </endpoint>

         <endpoint>
            <id>alfresco-feed</id>
            <name>Alfresco Feed</name>
            <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
            <connector-id>http</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <basic-auth>true</basic-auth>
            <identity>user</identity>
         </endpoint>

         <endpoint>
            <id>activiti-admin</id>
            <name>Activiti Admin UI - user access</name>
            <description>Access to Activiti Admin UI, that requires user authentication</description>
            <connector-id>activiti-admin-connector</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/activiti-admin</endpoint-url>
            <identity>user</identity>
         </endpoint>
      </remote>
   </config>
   <!– Document Library config section –>
   <config evaluator="string-compare" condition="DocumentLibrary" >

      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="custom:DocumentComptable" />
         </visible>
      </aspects>
   </config>

</alfresco-config>

eltorio
Champ in-the-making
Champ in-the-making
Thanks everyone for your help
this is my config
1-shared/classes/alfresco/extension/DocumentComptable-model.xml

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


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

   <!– Optional meta-data about the model –>
   <description>Modele comptable</description>
   <author>Ronan</author>
   <version>1.0</version>

   <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>

   <namespaces>
      <namespace uri="http://documentum.sudagri-jatropha.com/model/content/1.0" prefix="custom"/>
   </namespaces>
        <constraints>
                <constraint name="custom:listTypesPieceComptable" type="LIST">
                        <parameter name="allowedValues">
                                <list>
                                    <value>Facture achat</value>
                                    <value>Facture vente</value>
                                    <value>Cheque</value>
                                    <value>Masse salariale</value>
                                </list>
                        </parameter>
                </constraint>
        </constraints>
        <aspects>
                <aspect name="custom:DocumentComptable">
                <title>Document Comptable</title>
                        <properties>
                                <property name="custom:CodePieceComptable">
                                        <title>Numero piece comptable</title>
                                        <type>d:text</type>
                                        <protected>false</protected>
                                        <mandatory>true</mandatory>
                                        <multiple>false</multiple>
                                </property>
                                <property name="custom:TypePieceComptable">
                                        <title>Type de piece comptable</title>
                                        <type>d:text</type>
                                        <protected>false</protected>
                                        <mandatory>true</mandatory>
                                        <multiple>false</multiple>
                                        <constraints>
                                                <constraint ref="custom:listTypesPieceComptable" />
                                        </constraints>
                                </property>
                                <property name="custom:Echeance">
                                        <title>Echance piece</title>
                                        <type>d:text</type>
                                        <protected>false</protected>
                                        <mandatory>false</mandatory>
                                        <multiple>false</multiple>
                                </property>
                                <property name="custom:Montant">
                                        <title>Montant total piece</title>
                                        <type>d:text</type>
                                        <protected>false</protected>
                                        <mandatory>false</mandatory>
                                        <multiple>false</multiple>
                                </property>
                        </properties>
                </aspect>
        </aspects>
</model>

2- shared/classes/alfresco/extension/DocumentComptable-model-context.xml

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

</beans>


3- shared/classes/alfresco/web-extension/share-config-custom.xml

<alfresco-config>

   <!– Repository Library config section –>
   <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
      <!–
         Whether the link to the Repository Library appears in the header component or not.
      –>
      <visible>true</visible>
   </config>

   <config evaluator="string-compare" condition="Remote">
      <remote>
         <endpoint>
            <id>alfresco-noauth</id>
            <name>Alfresco - unauthenticated access</name>
            <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>none</identity>
         </endpoint>

         <endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>user</identity>
         </endpoint>

         <endpoint>
            <id>alfresco-feed</id>
            <name>Alfresco Feed</name>
            <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
            <connector-id>http</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <basic-auth>true</basic-auth>
            <identity>user</identity>
         </endpoint>

         <endpoint>
            <id>activiti-admin</id>
            <name>Activiti Admin UI - user access</name>
            <description>Access to Activiti Admin UI, that requires user authentication</description>
            <connector-id>activiti-admin-connector</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/activiti-admin</endpoint-url>
            <identity>user</identity>
         </endpoint>
      </remote>
   </config>
   <!– Document Library config section –>
   <config evaluator="string-compare" condition="DocumentLibrary" >

      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="custom:DocumentComptable" />
         </visible>
      </aspects>
   </config>

</alfresco-config>


Except catalina.properties for the shared class loader that is all I modified

rjohnson
Star Contributor
Star Contributor
This looks OK. One of my original comments did not come out because I forgot code tags. Could you try



   <config evaluator="string-compare" condition="DocumentLibrary" >



      <aspects>

         <!– Aspects that a user can see –>

         <visible>

            <aspect name="custom:DocumentComptable" />

         </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>

   </config>


This should be unnecessary.

Have you checked Alfresco.log and Share.log for errors?

eltorio
Champ in-the-making
Champ in-the-making
Thank you rjonhson for all the time you spend for helping me.
I tried your code (in fact just adding empty addable and removeable tags isn't it?)
This is my tomcat log, my alfresco log and my share log I'm new to alfresco and my eyes did not seen any bad line.