-
Type:
Bug
-
Resolution: Invalid
-
Priority:
Normal
-
None
-
Affects Version/s: Freshly, 8.6.1, 8.6.2
-
Component/s: Components, ZK Update Engine
-
Security Level: Jimmy
-
None
Steps to Reproduce
http://zkfiddle.org/sample/343u2pl/1-include-defer-issues
click the button
Current Result
when running with 8.6.1 -> ZK-4303
when running with 8.6.2.FL.20190613 the initial rendering only partially succeeds
(the include, content is not rendered -> ZK-4303 reopened)
['zul.wgt.Include','mO4Q4',{enclosingTag:'div',_xcnt:null},{},[]]]],
clicking the button causes JS errors
zk.wpd:25017 Uncaught TypeError: Cannot set property '1' of undefined at zkx_ (zk.wpd:25017) at Object.addChd (zk.wpd:27354) at doProcess (zk.wpd:25706) at doCmdsNow (zk.wpd:25806) at Object._doCmds (zk.wpd:26174) at Object.afterResponse (zk.wpd:26680) at XMLHttpRequest._onResponseReady (zk.wpd:26535) zk.wpd:24708 Uncaught TypeError: Cannot read property 'length' of undefined at getTypes (zk.wpd:24708) at getTypes (zk.wpd:24709) at mountpkg (zk.wpd:24688) at zkx (zk.wpd:24996) at zkx_ (zk.wpd:25018) at Object.addChd (zk.wpd:27354) at doProcess (zk.wpd:25706) at doCmdsNow (zk.wpd:25806) at Object._doCmds (zk.wpd:26174) at Object.afterResponse (zk.wpd:26680)
Expected Result
no errors
Debug Info
the include src is updated 2 times (defer mode causes the problems)
1) in.zul?val=initial
2) in.zul?val=changed
Root Cause
the response JS is syntactically incorrect
{"rs":[["rm",["mO4Q9"]],["rm",["mO4Qa"]],["rm",["mO4Qb"]],["addChd",["mO4Q1",[ ['zul.wgt.Label','mO4Qf',{value:'initial'},{},[]]],[ ['zul.wgt.Label','mO4Qg',{value:'child 2'},{},[]]],[ ['zul.wgt.Include','mO4Qh',{enclosingTag:'div',_xcnt:null},{},[]]]]],["rm",["mO4Qf"]],["rm",["mO4Qg"]],["rm",["mO4Qh"]],["addChd",["mO4Q1",[ ['zul.wgt.Label','mO4Ql',{value:'changed'},{},[]]], ['zul.wgt.Label','mO4Qm',{value:'child 2'},{},[]],, ['zul.wgt.Include','mO4Qn',{enclosingTag:'div',_xcnt:'<div id=\"mO4Qo\" class=\"z-temp\"><div id=\"zk_proc\" class=\"z-loading\"><div class=\"z-loading-indicator\"><span class=\"z-loading-icon\"><\/span>Processing...<\/div><\/div><\/div>',_childjs:function(){zk.themeName='breeze';zkmx( [0,'mO4Qo',{ow:'mO4Qn'},{},[ ['zul.wgt.Div','mO4Qp',{prolog:' '},{},[ ['zul.wgt.Label','mO4Qq',{value:'\n in contents #changed\n '},{},[]]]]]]); }},{},[]]]]],"rid":1}