Revision history [back]

click to hide/show revision 1
initial version

answered 2022-04-11 15:06:23 +0800

hawk gravatar image hawk

http://hawkphoenix.blogsp... ZK Team

The error means a javascript error happened on index.zul in a browser. Since the error message Unexpected token '.' is quite general. It's hard to infer what's the root cause.

It's better to open the browser developer tool > Console tab on the target browser to check the error's stack trace.

If zk doesn't print the stack trace for that error, please put the setting below in zk.xml to print it:

<device-config>
    <device-type>ajax</device-type>
    <embed><![CDATA[
    <script type="text/javascript">
    zk.afterLoad('zk', function() {
        zk.error = function (msg) {
            zAu.send(new zk.Event(null, 'error', {message: msg}, {ignorable: true}), 800);
            zk._Erbx.push(msg);
            if (msg.stack){
                console.log(msg.stack);
            }
        };
    });
    </script>
 ]]></embed>
</device-config>

The error means a javascript error happened on index.zul in a browser. Since the error message "Unexpected token '.' " is quite general. It's hard to infer what's the root cause.cause. But it's definitely a JavaScript syntax error. So please check the included js files on that page.

It's better to open the browser developer tool > Console tab on the target browser to check the error's stack trace.

If zk doesn't print the stack trace for that error, please put the setting below in zk.xml to print it:

<device-config>
    <device-type>ajax</device-type>
    <embed><![CDATA[
    <script type="text/javascript">
    zk.afterLoad('zk', function() {
        zk.error = function (msg) {
            zAu.send(new zk.Event(null, 'error', {message: msg}, {ignorable: true}), 800);
            zk._Erbx.push(msg);
            if (msg.stack){
                console.log(msg.stack);
            }
        };
    });
    </script>
 ]]></embed>
</device-config>
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More