Zimbra's code minification is breaking zimlet

Interested in talking about Mash-up's? This is the place.
Posts: 5
Joined: Mon Oct 24, 2016 8:53 pm

Zimbra's code minification is breaking zimlet

Postby fostah » Mon Nov 28, 2016 11:31 pm

Platform: Zimbra 8.6

Problem: After installing an open source zimlet (ConverseJS: https://github.com/Zimbra-Community/com_zimbra_converse), I am getting unusual console errors. When running with ?dev=1, the zimlet works fine.

Console Error: Uncaught TypeError: ee is not a function(…)
Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:23709 Uncaught TypeError: Cannot read property 'initialize' of undefined(…)

I dug farther into the code minified by zimbra and noticed that ee was defined many times. Below you can see its specified as a function, and right after that its defined as an object.

Is there any way to configure the minification process or disable it for certain zimlets? Or has anyone else ran into this issue?

Any help is greatly appreciated.

Code: Select all

function ee(){
var v=d_(this._milliseconds)/1000,j=d_(this._days),p=d_(this._months),d,y,z;
var m=z,q=p,x=j,w=y,g=d,k=v,b=this.asSeconds();
return b?(b<0?"-":"")+"P"+(m?m+"Y":"")+(q?q+"M":"")+(x?x+"D":"")+(w||g||k?"T":"")+(w?w+"H":"")+(g?g+"M":"")+(k?k+"S":""):"P0D"
var aa,t5=e9.momentProperties=[],e7=!1,aa={}
return this.month()+1

FWIW: I tried clearing my browser cache and clearing the zimlet on the server with zmprov. Neither helped.

Posts: 7
Joined: Mon Nov 13, 2017 12:23 pm

Re: Zimbra's code minification is breaking zimlet

Postby ozzi » Mon Nov 13, 2017 1:35 pm


Try to launch webmail with ?dev=1 and see if it works.
If it doesn't, its your code, if it does, its the minification.

Keep us posted

Return to “Zimlets”

Who is online

Users browsing this forum: No registered users and 2 guests