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

Confluence import: empty pages have no "bodyType" attribute

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      It is possibe to create "completely empty" pages in confluence; i.e. pages where the content (that is the "body" property of the corresponding BodyContent object) is actually "null" (and not the empty string). These BodyContent objects also have no "bodyType" property, which produces the following error:

        java.util.NoSuchElementException: 'bodyType' doesn't map to an existing object
              at org.apache.commons.configuration.AbstractConfiguration.getInt(AbstractConfiguration.java:816)
              at org.xwiki.wikistream.confluence.xml.internal.input.ConfluenceInputWikiStream.readPageRevision(ConfluenceInputWikiStream.java:377)
              at org.xwiki.wikistream.confluence.xml.internal.input.ConfluenceInputWikiStream.readPageRevision(ConfluenceInputWikiStream.java:335)
              at org.xwiki.wikistream.confluence.xml.internal.input.ConfluenceInputWikiStream.readPage(ConfluenceInputWikiStream.java:312)
              at org.xwiki.wikistream.confluence.xml.internal.input.ConfluenceInputWikiStream.read(ConfluenceInputWikiStream.java:248)
              at org.xwiki.wikistream.confluence.xml.internal.input.ConfluenceInputWikiStream.read(ConfluenceInputWikiStream.java:56)
              at org.xwiki.wikistream.internal.input.AbstractBeanInputWikiStream.read(AbstractBeanInputWikiStream.java:78)
      

      Not sure if that case must be handled, but if it should, I guess creating an empty XWiki page is the appropriate action here (after all the page exist, and can have children, can be linked to, etc pp).
      If that is ok, I can send a pull request doing this.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            camil7 Clemens Robbenhaar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: