The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

Opera 11.60 new JS error, site stops loading, works with dragonfly enabled

Forums » Opera for Windows/Mac/Linux » Opera browser

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

7. December 2011, 08:42:08

sjonsel

Posts: 2

Opera 11.60 new JS error, site stops loading, works with dragonfly enabled

Hi,

I have a weird issue with the new 11.60. Before I had 11.51 (linux) and it worked correctly before.
You can see the bug yourself in this demo: https://demo.zarafa.com/webapp/ Login using demo1/demo1.
The hierarchy folders on the left keeps saying "loading", so you can't continue. but if you enable dragonfly, the hierachy will load, and you can click any folder for it's contents.
I'm no JS guru, so I have no clue what's going on. Could anybody give a hint? smile

John

9. December 2011, 08:05:23

asmc

Posts: 3

Zarafa stops after 3 seconds when calling the start login site.furious
What have they done with the Version 11.60??
I sent a bug report and I hope it will soon be solved!
what a miss!!
Stephan

16. December 2011, 11:21:23 (edited)

sjonsel

Posts: 2

After some debugging I've found the code that generates the error, and I've found a bizar way to fix it.
First the console error:
[12/16/2011 11:49:12 AM] JavaScript - http://localhost/webapp/index.php
Event thread: readystatechange
Uncaught exception: TypeError: Cannot convert 'this.data' to object
Error thrown at line 33492, column 8 in <anonymous function: get>(name) in http://localhost/webapp/client/extjs/ext-all-debug.js:
    return this.data[name];
called from line 134, column 3 in <anonymous function: isFolderOpened>(folder) in http://localhost/webapp/client/zarafa/hierarchy/ui/HierarchyTreePanel.js:
    state = container.getSettingsModel().get(this.settingsBase + '/' + folder.get('entryid') + '/is_open');
called from line 304, column 3 in <anonymous function: createNode>(attr) in http://localhost/webapp/client/zarafa/hierarchy/data/HierarchyTreeLoader.js:
    attr.expanded = this.tree.isFolderOpened(folder);
called from line 81, column 4 in <anonymous function: onHierarchyLoad>(data, response) in http://localhost/webapp/client/zarafa/hierarchy/data/HierarchyTreeLoader.js:
    var node = this.createNode(data[i]);
called via Function.prototype.apply() from unknown location in <anonymous function: createDelegate>() in http://localhost/webapp/client/extjs/ext-base-debug.js:
    /* no source available */
called from line 230, column 2 in <anonymous function: directFn>(node, fn) in http://localhost/webapp/client/zarafa/hierarchy/data/HierarchyTreeLoader.js:
    fn(data, {status: true});
called via Function.prototype.apply() from unknown location in <anonymous function: createDelegate>() in http://localhost/webapp/client/extjs/ext-base-debug.js:
    /* no source available */
called from line 79, column 2 in <anonymous function: onHierarchyLoad>(store, records, options) in http://localhost/webapp/client/zarafa/hierarchy/data/HierarchyTreeLoader.js:
    this.directFn(rootNode.id, function(data, response) {
called via Function.prototype.apply() from line 2429, column 12 in <anonymous function: fire>() in http://localhost/webapp/client/extjs/ext-all-debug.js:
    var args = Array.prototype.slice.call(arguments, 0);
called from line 2059, column 16 in <anonymous function: fireEvent>() in http://localhost/webapp/client/extjs/ext-all-debug.js:
    q.push(a);


so for some reason, the folder.get('entryid') is invalid, since the extjs object doesn't have the data member anymore. The following line of javascript creates the error:
state = container.getSettingsModel().get(this.settingsBase + '/' + folder.get('entryid') + '/is_open');


The fix I found to work is to get the entryid in a variable first, and then use that in the concatenation:
var eid = folder.get('entryid');
state = container.getSettingsModel().get(this.settingsBase + '/' + eid + '/is_open');

Another "fix" was to get the whole argument in a variable, and use that:
var jaap = this.settingsBase + '/' + folder.get('entryid') + '/is_open';
state = container.getSettingsModel().get(jaap);


I have absolutely no clue why this is broken, and why the above code fixes the opera javascript engine.
The line is called for every folder in the hierarchy, and just once (well, you only need one) will the code "crash".
Opera 11.51 had no problem with the old code, it was introduced in 11.60. If you enable DragonFly, the code (without the fix) works fine too (some optimizer gets disabled?). Opera 12.00 previews (all) already and still have this problem too.

btw, is this forum the correct way to get Opera developers their attention? smile

edit
After this fix, the same kind of error, where this.data[name] will nolonger be an object, will happen somewhere else.

Forums » Opera for Windows/Mac/Linux » Opera browser