when accessing a menu in a <tree>-Tag with <treeitem id="titem1" visible="false" value="pageUriName"> I got some problems with IE8.
The bug doesn't appear in IE9, Firefox or other and is called >>Failed to process setAttr 'null' Is Null Or Not An Object<<.

In the developer tools, this is printed:
Message: 'null' is null or not an object
Line: 23
Char: 11118
Code: 0
URI: http://localhost:8080/appname/zkau/web/a057d87e/js/zk.wpd

Comments

Unfortunately it's quite complicated to isolate to "buggy treeitem", because all Composer to the corresponding zul-Pages use the same Composer and some work and some don't. Maybe I found a hint, but I don't know what to do with this:

1 Answer

first: you could try upgrading to a new ZK 5 version e.g. 5.0.11 (CE) or 5.0.13 (PE/EE) and check if the problem persists, it is likely that severe bugs are fixed in higher versions.
(http://www.zkoss.org/download/zk click maintenance downloads)

second: the stackoverflow link you found gives you some basic ideas how to get started debugging a JS error, most important here is to enable debug-js in your zk.xml:

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

that will turn difficult to identify error locations like (char 11000 in line 23)

Line: 23 Char: 11118

into something like

Line: 5678 Char: 32 (just made up)

e.g. in chrome if you enable the developer tools (F12) before reproducing the error you'll get the JS call stack with all the method calls and positions that cause the issue.

You can even click the line number and directly see the code that's causing it.

Also check the last ajax response (/zkau request) and see which component was added, or changed last, this will help reducing the code to have an isolated example only focussing on the atomic operation causing the trouble.

2) It turned out, that some GUI elements were manipulated during the DOM-Creation. This caused the unexpected behaviour... Additionally I've created an example in ZK-Fiddle, which didn't show that error, but this was helpfull to understand my fault. So thanks four your help!

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!