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

Copying a document via XWiki#copyDocument with reset option activated sometimes keeps the source document history

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce

      In main wiki with single language:

      • Create page "Sandbox.ABC.WebHome" and edit it several times so that it has several major versions.
      • Copy "Sandbox.ABC.WebHome" to "Sandbox.ABC1.WebHome" via XWiki#copyDocument(String docname, String targetdocname, String sourceWiki, String targetWiki, String wikilocale, boolean reset, boolean force) with "reset" and "force" arguments set to true in a Velocity script, using the same source and target wikis, and "locale" set to "$NULL".
      • In some cases the document copy operation needs to be executed for two distinct target documents before the bug gets fired (on the second target only).

      Expected result

      The target document has a single version: 1.1.

      Actual result

      In the history tab of the target document, the versions of the original document are shown. However when flushing XWiki cache, the history of the target document shows only one version: 1.1 as expected, when the wiki is single language. When the source document has one or several translations, the translated target documents keep the source history even after the cache is flushed. I have not checked what the xwikircs table contains for these documents.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              slauriere slauriere
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: