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

Importing unknown confluence page types with attachments triggers an error

    Details

    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      When trying to import certain page types that are not supported by the current import i.e. pages of class="BlogPost" (yes, that is a blog post) or class="CustomContentEntityObject" (that is from a plugin too lazy to defien its own page type, e.g. the "mailarchiver" plugin that imports mail archives into the wiki), these pages get silently ignored.

      However if theses pages have attachments, the import tries to find the page they belong to when importing, creating an error:

      java.util.NoSuchElementException: 'content' doesn't map to an existing object 
       at org.apache.commons.configuration.AbstractConfiguration.getInt(AbstractConfiguration.java:816)
       at org.xwiki.wikistream.confluence.xml.internal.ConfluenceXMLPackage.readAttachmentObject(ConfluenceXMLPackage.java:400)
       at org.xwiki.wikistream.confluence.xml.internal.ConfluenceXMLPackage.readObject(ConfluenceXMLPackage.java:353)
       at org.xwiki.wikistream.confluence.xml.internal.ConfluenceXMLPackage.createTree(ConfluenceXMLPackage.java:323)
       at org.xwiki.wikistream.confluence.xml.internal.ConfluenceXMLPackage.(ConfluenceXMLPackage.java:223)
       at org.xwiki.wikistream.confluence.xml.internal.input.ConfluenceInputWikiStream.read(ConfluenceInputWikiStream.java:85)
       at org.xwiki.wikistream.confluence.xml.internal.input.ConfluenceInputWikiStream.read(ConfluenceInputWikiStream.java:56)
       at org.xwiki.wikistream.internal.input.AbstractBeanInputWikiStream.read(AbstractBeanInputWikiStream.java:78)
       at org.xwiki.wikistream.internal.job.WikiStreamConverterJob.runInternal(WikiStreamConverterJob.java:82)
       at org.xwiki.job.internal.AbstractJob.run(AbstractJob.java:138)
       at org.xwiki.wikistream.script.internal.ScriptWikiStreamConverterJob.run(ScriptWikiStreamConverterJob.java:75)
       at org.xwiki.job.internal.DefaultJobManager.runJob(DefaultJobManager.java:134)
      

      Possible options to fix this:

      • for these pages also fail to import the attachments silently
      • consider this error message a feature and try to support all the other page types
      • issue a warning and import the attachment to a special page where all the homeless attachmetn go
      • ... lots of other options

      depending on what is decided to do here I might try to work on a patch

        Attachments

          Activity

            People

            • Assignee:
              camil7 Clemens Robbenhaar
              Reporter:
              camil7 Clemens Robbenhaar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: