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

'Import a XAR in a wiki' REST API is not working as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 14.4.7, 14.4.6
    • REST
    • None
    • Unknown

    Description

      XWiki version : 14.4.7

      To reproduce :

      • Create a test wiki page and export it as a XAR
      • Edit the page and modify its content
      • Re-import the exported XAR in the wiki using the "Import a XAR in a wiki", see documentation, use this curl command to import the XAR :
      curl -u "username:password" -X POST "http://localhost:8080/xwiki/rest/wikis/xwiki?backup=false&history=ADD" --data-binary "@/Path/to/the/xar/file" -H "Content-type:application/octet-stream" 
      

      Expected results : The XAR file was successfully imported and a new version was added to the test page.

      Current results: The REST service is executed but the import failed, what happen is that the Test page is deleted instead of being updated by the import, see screenshot :

      This error is found in the tomcat logs : error.txt.

      Note that :

      • The issue only happen if the imported page already exists in the wiki, so, if you use the REST API to import a new page the import is executed correctly
      • The import is correctly working if it is done manually via the wiki administration
      • It seems that the issue is a regression because I don't reproduce it on a 10.11.8 instance

      Attachments

        Activity

          People

            Unassigned Unassigned
            mouhb Mohamed Boussaa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: