Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4043

Client error with MessageBox / duplicate UUIDs and script elements

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 8.6.0
    • 8.5.0, 8.5.2, 8.5.2.1
    • ZK Client Engine
    • Security Level: Jimmy
    • ensure UUID recycle is enabled (default setting)

    • ZK 8.6.0 S1, ZK 8.6.0 S2

      Steps to Reproduce

      run messbox-uuid-script.zul

      click the button in sequence: A, B, OK, C, A, B

      Current Result

      zk.wpd:24823 Uncaught TypeError: Cannot read property '0' of undefined
          at Object.onBind (zul.wnd.wpd:2946)
          at init.onBind (eval at $.evalJSON (zk.wpd:28129), <anonymous>:9:20)
          at init.fireX (zk.wpd:21714)
          at init.fire (zk.wpd:21834)
          at zk.wpd:21082
          at doAfterMount (zk.wpd:24636)
          at mtAU0 (zk.wpd:24629)
          at mtAU (zk.wpd:24625)
          at zkx (zk.wpd:24816)
          at zkx_ (zk.wpd:24832)
      

      Expected Result

      no error

      Debug Info

      when detaching the window a <script> element remains in the DOM with a UUID.
      This UUID may be re-used at server side for new components created later - in this for a label-widget inside the messagebox (causing the error when opening the message box for the second time)

      Root Cause

      Workaround

      Disable UUID recycle: in zk.xml

      	<library-property>
      		<name>org.zkoss.zk.ui.uuidRecycle.disabled</name>
      		<value>true</value>
      	</library-property>
      

            rudyhuang rudyhuang
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 5 minutes Time Not Required
                3h 5m