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

Uncaught exception when previewing deleted section

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 10.11.1, 9.11.9, 11.0
    • 9.11.3, 10.11
    • Old Core
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce.

      1. Create a new page.
      2. Create a heading on the page, say, = Section = and save.
      3. Edit this section (not the whole page) and remove everything.
      4. Click 'Preview'.

      Result (truncated):

      Detailed information:
          Error number 0 in 11: Uncaught exception
      com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:473)
      ...
      Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.rangeCheck(ArrayList.java:657)
      	at java.util.ArrayList.get(ArrayList.java:433)
      	at com.xpn.xwiki.doc.XWikiDocument.getDocumentSection(XWikiDocument.java:7718)
      	at com.xpn.xwiki.web.EditAction.updateDocumentTitleAndContentFromRequest(EditAction.java:224)
      	at com.xpn.xwiki.web.EditAction.prepareEditedDocument(EditAction.java:96)
      	at com.xpn.xwiki.web.PreviewAction.render(PreviewAction.java:102)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:446)
      	... 75 more
      

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              johnnybaloney Johnny Baloney
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: