Uploaded image for project: '{RETIRED} CKEditor Integration'
  1. {RETIRED} CKEditor Integration
  2. CKEDITOR-48

Wiki Page source gets into bad state when macro that produces no output is used with CKEditor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 1.4
    • 1.3
    • None
    • OS: Mac OS X 10.11.4
      XWiki: 7.4.2 standalone on Jetty server
      CKEditor Integration: 1.3
      Browser: Safari, Firefox for Mac, Chrome for Mac

    Description

      This bug was found while testing locally CKEDITOR-35.

      Details

      When editing a wiki page that already includes a macro that produces no visual output, clicking back and forth in and out of Source causes the content to get into an unstable state. This also leads to data loss as clicking Save does not save the changes.

      Set up:

      • New installation of XWiki Enterprise 7.4.2 ZIP Package
      • Only CKEditor Integration 1.3 and WebJar installed

      Steps to Repro

      1. Start your XWiki instance with CKEditor 1.3 installed.
      2. Go to a new page (EditorTest).
      3. Click the Pencil and Choose CKEditor to Edit the page using CKEditor.
      4. Click the Source button to go to Source view.
      5. Add the following text:
        {{html}}{{/html}}
        
      6. Click 'Save & View'.
      7. Click the Pencil and Choose CKEditor to Edit the page using CKEditor.
      8. CKEditor now shows in the Content: macro:html (image 1)
      9. Click the Source button.
      10. Under the html macro we recreated in the first revision paste the following content (image 2):
        
        (% border="1" cellspacing="1" cellpadding="1" style="width:500px;" %)
        |(% style="width: 367px;" %) |(% style="width: 132px;" %) 
        |(% style="width: 367px;" %) |(% style="width: 132px;" %) 
        |(% style="width: 367px;" %) |(% style="width: 132px;" %)
        
      11. Click the Source button again to view the rendered table (image 3).
      12. Click the Source button again to view the markup but make no changes.
      13. Click the Source button again to see the table is now not editable and appears to be part of the macro (image 4).
      14. Click the Source button once more and the table markup is now gone (image 5).
      15. Repeated clicking of the Source button will show the Table in the Rendered view but not Source view.

      Also

      • Once the content in this state the table will not be saved.
      • If any content is added below the table in the Rendered View it will be seen when clicking Source, however the table markup will be gone. Clicking 'Save & View' will save the the new content but not the table.
      • Adding any new content in the Source view will render as if the table was never added.
      • There are no javascript errors logged in the console.

      Attachments

        1. 1-ckeditor_bug.png
          1-ckeditor_bug.png
          38 kB
        2. 2-ckeditor_bug.png
          2-ckeditor_bug.png
          61 kB
        3. 3-ckeditor_bug.png
          3-ckeditor_bug.png
          37 kB
        4. 4-ckeditor_bug.png
          4-ckeditor_bug.png
          37 kB
        5. 5-ckeditor_bug.png
          5-ckeditor_bug.png
          40 kB

        Activity

          People

            mflorea Marius Dumitru Florea
            jmiklos Jim Miklos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: