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

The WYSIWYG editor doesn't always load when adding an annotation



    • Unknown
    • N/A
    • N/A


      You can reproduce on two ways:

      • on pages displayed with sheets, because they are not editable in-place (with the WYSIWYG editor), e.g. Help.Applications.Contributors.Charlie Chaplin
      • on plain wiki pages, if you disable in-place editing, e.g. Sandbox.WebHome

      The issue is that the annotation popup doesn't load the WYSIWYG editor sources, so it works only if the WYSIWYG editor sources are already loaded. This can happen if:

      • in-place editing is enabled for the current page
      • the comments tab loads the WYSIWYG editor, but this doesn't happen anymore since XWIKI-17656.

      Short history:

      • 12.3 we add support for in-place editing
      • 12.6 we add support for WYSIWYG editor in comments and annotations
        • the bug can still be reproduced if the Comments tab is not the default tab (e.g. open the Attachments tab and reload the page)
      • 12.7 / 12.6.2 we stopped loading the WYSIWYG editor when the Comments tab is loaded (you need to click on a button, XWIKI-17656); this made the bug more visible

      I checked the response for the request to AnnotationCode.CreateForm and there's no script tags in the returned HTML and there's no X-XWIKI-HTML-HEAD header so we need to fix two things:

      • include the required script (declaration) in the response, either in the body or using the HTTP custom header (preferred way)
      • load the required JavaScript specified on the response from the annotation JavaScript code


        Issue Links



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