cancel
Showing results for 
Search instead for 
Did you mean: 

Setting client-debug for using uncompressed JS files

cybertoast
Champ in-the-making
Champ in-the-making
This is just in case anyone else needed this information - took me a while to find it (and there are a few forum posts related to this without a clear pointer).

For webscripts and dashlets, the components/component.head.inc file determines whether to use the compressed or uncompressed JS file included with the component:

<#assign minJS=(config.global.flags.childrenMap["client-debug"][0].value = "true")?string(".js", "-min.js")>

Configuration settings are stored in the webscripts-framework-config-custom.xml file (if you're making the changes in your web-extension vs. in the main webscripts-framework-config.xml). The 3.0_Web_Scripts wiki page describes how configurations are defined.

To set the client-debug flag, add this code to webscripts-framework-config-custom.xml:

<config>
  <flags>
    <client-debug>true</client-debug>
  </flags>
</config>

This requires an Alfresco restart.
3 REPLIES 3

mikeh
Star Contributor
Star Contributor
Nice tip - I guess it's not that obvious unless you'd been to one of our recent meet-ups  Smiley Happy

We'll be recommending people start using the somewhat more logically named share-config-custom.xml instead of webscripts-framework-config-custom.xml. In fact, I believe this should work already on 3.2r.

Thanks,
Mike

esheehan
Champ in-the-making
Champ in-the-making
In Alfresco 3.2r Enterprise this configuration caused exceptions in Freemarker for me. Adding replace="true" to the config block fixed my problem.


<config replace="true">
  <flags>
    <client-debug>true</client-debug>
  </flags>
</config>

I found that, as well as several other good development tips here: http://blogs.alfresco.com/wp/kevinr/2010/04/07/developer-tips-for-alfresco-share-33/

jevon
Champ in-the-making
Champ in-the-making
For Alfresco Share, the relevant configuration file is <tomcat>/shared/classes/alfresco/web-extension/share-config-custom.xml. Make sure that you restart Alfresco after changing the setting:


   <config replace="true">
      <flags>
         <client-debug>true</client-debug>
      </flags>
   </config>