cancel
Showing results for 
Search instead for 
Did you mean: 

Web client custom config

jurgisl
Champ in-the-making
Champ in-the-making
Hi!

I'm trying to create custom content models, but cannot customize web client to include my custom models. I followed the wiki and tutorials but my Alfresco instance is ignoring all custom web client configuration files. I tried static version in /extensions folder and dynamic version in the data dictionary repository. Both are ignored when I run "reload" command in the web client config admin console.

Web client admin console output:
Web Client config has been reloaded

<Built-in evaluators> —> OK
classpath:alfresco/web-client-config.xml —> OK
classpath:alfresco/web-client-config-dialogs.xml —> OK
classpath:alfresco/web-client-config-wizards.xml —> OK
classpath:alfresco/web-client-config-properties.xml —> OK
classpath:alfresco/web-client-config-navigation.xml —> OK
classpath:alfresco/web-client-config-wcm.xml —> OK
classpath:alfresco/web-client-config-actions.xml —> OK
classpath:alfresco/web-client-config-forum-actions.xml —> OK
classpath:alfresco/web-client-config-wcm-actions.xml —> OK
classpath:alfresco/web-client-config-workflow-actions.xml —> OK

But it is missing last to lines:
classpath:alfresco/extension/web-client-config-custom.xml —> Skipped - not available
workspace://SpacesStore/app:company_home/app:dictionary/app:webclient_extension/cm:web-client-config-custom.xml —> OK

I tried modifying "web-client-application-context.xml" and all my changes do reflect in the console output but it ignores lines with custom config files.

Do I have to enable web client customization somewhere for custom files to work?

I tried Alfresco Community edition 3.4.d and 3.4.c installer on a 64bit Ubuntu.
6 REPLIES 6

jpotts
World-Class Innovator
World-Class Innovator
Can you provide a copy of your web-client-config-custom.xml file? And, double-check that you are placing a file, with that exact name, under WEB-INF/classes/alfresco/extension/.

Jeff

jurgisl
Champ in-the-making
Champ in-the-making
Thanks for reply!

In my current configuration I have put the web-client-config-custom.xml file in the Data Dictionary only, as described in the "Dynamic Models" wiki page. I thought that even if there is no file in the extension folder, the web client console reload should show that line with a result "—> Skipped - not available". And an error if the custom config file is invalid.

My web-client-config-custom.xml file is nothing special, I created it following an old tutorial in the alfresco developer series and reading current wiki.

<alfresco-config>
    <config evaluator="aspect-name" condition="sc:webable">
      <property-sheet>
         <show-property name="sc:published" display-label-id="published" />
         <show-property name="sc:isActive" display-label-id="published" read-only="true" />
         <show-association name="sc:relatedDocuments" />
      </property-sheet>
   </config>
  
   <config evaluator="string-compare" condition="Content Wizards">
      <content-types>
        <type name="sc:doc" />
        <type name="sc:whitepaper" />
      </content-types>
   </config>
  
   <config evaluator="string-compare" condition="Action Wizards">
        <aspects>
            <aspect name="sc:webable"/>
            <aspect name="sc:productRelated"/>
        </aspects>

        <subtypes>
            <type name="sc:doc" />
            <type name="sc:whitepaper" />
        </subtypes>
       
        <specialise-types>
            <type name="sc:doc" />
            <type name="sc:whitepaper" />
        </specialise-types>
   </config>

</alfresco-config>

I have also tried several other configs from much more current examples, but with the same results. Custom config file is ignored even if it's empty. I checked file name several times, even copied it from the wiki, to be sure I spelled it correctly. The custom models are active, I checked it with an API call.

I must be doing something wrong here.

jpotts
World-Class Innovator
World-Class Innovator
Can you try to put it in WEB-INF/classes/alfresco/extension, just to see if it gets picked up there?

Also, just to confirm, you said Data Dictionary, but the actual path would be /Company Home/Data Dictionary/Web Client Extension/

Jeff

jurgisl
Champ in-the-making
Champ in-the-making
Ok, I put a copy of web-client-config-custom.xml in the /opt/alfresco/tomcat/shared/classes/alfresco/extension folder, but unfortunately it is not picked up during alfresco restart and also didn't show up in the web client console reload results.

Sorry, I didn't write the whole path, yes I do put it in the /Company Home/Data Dictionary/Web Client Extension/. I thought it had to be picked up from one of the places, but now it seems that Alfresco is ignoring any custom web client configs. It even seems intentional.

I also tried to use the web client console's reload command on a vanilla windows version of alfresco community edition 3.4.c, and it also did not show that it tires to load a custom web client config. If you execute the reload command in the web client console, does your console show this line?
classpath:alfresco/extension/web-client-config-custom.xml —> Skipped - not available
Maybe my classpath is wrong? Can it be wrong?
Can I enable a logger to debug the web client console reload process? My alfresco.log file does not show any relevant errors or warnings.

jpotts
World-Class Innovator
World-Class Innovator
I am currently running a simplied SomeCo example model with a simplified web-client-config-custom.xml (all deployed to the WAR, not to the Data Dictionary) on 3.4.d Community. When I go to the web client config admin console and do a reload, I see:

<Built-in evaluators> —> OK
classpath:alfresco/web-client-config.xml —> OK
classpath:alfresco/web-client-config-dialogs.xml —> OK
classpath:alfresco/web-client-config-wizards.xml —> OK
classpath:alfresco/web-client-config-properties.xml —> OK
classpath:alfresco/web-client-config-navigation.xml —> OK
classpath:alfresco/web-client-config-wcm.xml —> OK
classpath:alfresco/web-client-config-actions.xml —> OK
classpath:alfresco/web-client-config-forum-actions.xml —> OK
classpath:alfresco/web-client-config-wcm-actions.xml —> OK
classpath:alfresco/web-client-config-workflow-actions.xml —> OK
classpath:alfresco/extension/web-client-config-custom.xml —> OK

Did you build from source or are you using a binary build?

If you go look in WEB-INF/classes/alfresco/web-client-application-context.xml, do you see a bean called webClientConfigSource, and does it look like this?

  
<bean id="webClientConfigSource" parent="repoUrlConfigSource">
      <constructor-arg>
         <list>
            <value>classpath:alfresco/web-client-config.xml</value>
            <value>classpath:alfresco/web-client-config-dialogs.xml</value>
            <value>classpath:alfresco/web-client-config-wizards.xml</value>
            <value>classpath:alfresco/web-client-config-properties.xml</value>
            <value>classpath:alfresco/web-client-config-navigation.xml</value>
            <value>classpath:alfresco/web-client-config-wcm.xml</value>
            <value>classpath:alfresco/web-client-config-actions.xml</value>
            <value>classpath:alfresco/web-client-config-forum-actions.xml</value>

            <value>classpath:alfresco/web-client-config-wcm-actions.xml</value>
            <value>classpath:alfresco/web-client-config-workflow-actions.xml</value>
            <value>classpath:alfresco/extension/web-client-config-custom.xml</value>
            <value>jar:*!/META-INF/web-client-config-custom.xml</value>
            <value>workspace://SpacesStore/${spaces.company_home.childname}/${spaces.dictionary.childname}/app:webclient_extension/cm:web-client-config-custom.xml</value>
         </list>
      </constructor-arg>
   </bean>

If you do have that bean and it has the appropriate list of values, are you overriding that bean anywhere?

Jeff

jurgisl
Champ in-the-making
Champ in-the-making
Good to hear that it works for you, so it must work for me too.

I am using binary build that I downloaded from here - http://wiki.alfresco.com/wiki/Download_and_Install_Alfresco
All I am doing is installing it using provided installation script and then upload my custom model and web client configuration. I am using Alfresco as it is "out of the box".

Maybe I should not put web-client-config-custom.xml in/opt/alfresco/tomcat/shared/classes/alfresco/extension but modify the /opt/alfresco/tomcat/webapps/alfresco.war?

My web-client-application-context.xml contains this bean, and I have not overridden it, don't know how to do it yet.
   
   <bean id="webClientConfigSource" parent="repoUrlConfigSource">
      <constructor-arg>
         <list>
            <value>classpath:alfresco/web-client-config.xml</value>
            <value>classpath:alfresco/web-client-config-dialogs.xml</value>
            <value>classpath:alfresco/web-client-config-wizards.xml</value>
            <value>classpath:alfresco/web-client-config-properties.xml</value>
            <value>classpath:alfresco/web-client-config-navigation.xml</value>
            <value>classpath:alfresco/web-client-config-wcm.xml</value>
            <value>classpath:alfresco/web-client-config-actions.xml</value>
            <value>classpath:alfresco/web-client-config-forum-actions.xml</value>

            <value>classpath:alfresco/web-client-config-wcm-actions.xml</value>
            <value>classpath:alfresco/web-client-config-workflow-actions.xml</value>
            <value>classpath:alfresco/extension/web-client-config-custom.xml</value>
            <value>jar:*!/META-INF/web-client-config-custom.xml</value>
            <value>workspace://SpacesStore/${spaces.company_home.childname}/${spaces.dictionary.childname}/app:webclient_extension/cm:web-client-config-custom.xml</value>
         </list>
      </constructor-arg>
   </bean>