cancel
Showing results for 
Search instead for 
Did you mean: 

onReady function is not fired from the client header- min script on Alfresco 4.2 upgraded stack from 3.4.10

paiyyavj13
Star Contributor
Star Contributor
hi,

We have recently upgraded our dev stack from 3.4.10 to 4.2.3.

The header-min.js is included in the header.get.html.ftl
    <@script src="${url.context}/res/components/header/header.js" group="header"/>

This file is called on the site dashboard but fails to fire the onReady function.

I have attached all the header webscript files.

Note: custom code is included in these files. This webscript works fine on the 3.4.10 stack but doesnot on the upgraded 4.2.3. The upgrade has been done considering the new webscript framework.

Please provide your inputs and let me know incase I am missing any step.

Appreciate your help.

Thanks.
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

there have been quite a lot of changes between Alfresco 3.4 and 4.2, especially to the way Share customizations work. Applying the same customization without being aware of those will likely not work.
Among those changes, the header of Share is no longer rendered (by default) by the header.get web script, so your custom .get.html.ftl isn't used - it is now up to the share-header.get web script, which you should not need to override to customize using the new customization techniques. The header itself is (by default) no longer using YUI 2, building instead on top of the new standard library Dojo ("standard" as in new UI components will use Dojo and existing ones may be migrated from YUI 2 to Dojo when time permits / significant refactoring would be necessary for a new feature). You also no longer require any *-min.js files because Alfresco / Surf can transparently minify them for you - in fact, *-min.js files are not even evaluated any more, so if you previously only overrode the *-min.js file (a bad practice in itself) your changes will no longer work with 4.2+.
Dave Draper has blogged about <a href="http://blogs.alfresco.com/wp/developer/2013/09/04/customizing-the-share-header-menu-part-1/">customizing the Share header</a> quite extensively and this is a good basis to check out the changes to (header) customization. Dave has also blogged about the new customization techniques.

Regards
Axel