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

Dynamic macros are not properly synchronized

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 16.2.0
    • 15.5.4, 15.10.4
    • Realtime
    • None
    • Integration
    • Unknown

    Description

      The current implementation of the realtime WYSIWYG editor supports only static macros that don't need custom CSS (see XWIKI-21765). For other macros you hit various problems:

      • if the macro needs custom CSS you have XWIKI-21765
      • if the macro output depends on the current user (e.g. shows the current username or checks the current user access rights or group membership, etc.) then all the co-editors will get the macro output from the user that inserts the macro, so all editors will see the macro as if they were the user that inserted it; at worse this can leak sensitive information and at best this can lead to poor UIX because the "point of view" will change once another user edits the macro...
      • if the macro output is generated dynamically with JavaScript then the first problem you have is that the JavaScript is not synchronized (same as XWIKI-21765). This means you have the "point of view" of the user that inserted the macro but without being able to interact with the macro output (imagine a collapse/expand macro). If we were to synchronize the JavaScript (HEAD) then we'd have serious synchronization problems with the macro output. Imagine that Alice inserts a Live Data macro. Bob receives the HTML and JavaScript. Both Alice and Bob now have some JavaScript that loads data from the server and update the macro output leading to duplicated content or synchronization conflicts (as if both users are typing the same thing at the same place).

      The only solution I see is to stop synchronizing the macro output and to re-execute it for each co-editor, but we need to handle the performance issue.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: