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

XClasses are not upgraded as expected when modified locally

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 16.4.6
    • Extension - XAR, Old Core
    • None
    • Unknown

    Description

      Steps to reproduce

      • Create a XAR extension containing an XClass XWiki.Test.TestClass with one String field named field1.
      • Build version 1.0 of that extension and install it with the Extension Manager.
      • Add an XObject to page XWiki.Test.TestClass, for example an instance of MovieClass.
      • Create version 1.1 of the extension with an additional String field named field2.
      • Upgrade the extension to 1.1.

      Expected result

      Page XWiki.Test.TestClass contains the new field field2.

      Actual result

      Page XWiki.Test.TestClass remains unchanged once the upgrade has completed. However, if the TestClass page is not modified locally before getting upgraded, the new field is added as expected during the upgrade.

      Screens

      The captures below show the diffs between:

      • current and new: as expected, the screen shows the added object is not present in the new version, and that a field was added in the new version.
      • current and merged: no change is shown, while the new field should be displayed.

      Sample extension

      Here is attached a test extension ready to be built: org.xwiki.contrib.test-1.0.zip TestClass.xml contains two field declarations. The second one needs to be removed when building version 1.0, and added to build version 1.1. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            slauriere slauriere
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: