Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-11715

JSX (SSX too?) gets executed twice if set to "On this page or on demand" and included manually

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      1. Create a test document with just a JSX include:
        {{velocity}}
        $xwiki.jsx.use($doc.fullName)
        {{/velocity}}
        
      2. Then add a simple JSX object:
        var times = window.times || 0;
        times++;
        alert('JSX executed! ' + times);
        

        ...leave the default option to "On this page or on demand"

      3. Save&View the page (make sure to refresh the browser cache).
      4. The javascript gets executed twice.

      Not sure about SSX and how they are handled, but javascripts get included twice in the output HTML's HEAD section.

      This issue looks a lot like XWIKI-7702.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                enygma Eduard Moraru
                Reporter:
                enygma Eduard Moraru
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: