This issue has been created
There are 3 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-dee7e6d5-cc72-4b33-b026-e309aff5fe15 XWIKI-22962 Open

XClasses are not upgraded as expected when modified locally

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-fbc2b77c-4ff5-4c94-89f3-7b44b7a9b2df slauriere created this issue on 10/Mar/25 17:20
 
Summary: XClasses are not upgraded as expected when modified locally
Issue Type: cid:jira-generated-image-avatar-dee7e6d5-cc72-4b33-b026-e309aff5fe15 Bug
Affects Versions: 16.4.6
Assignee: Unassigned
Components: Extension - XAR
Created: 10/Mar/25 17:20
Priority: cid:jira-generated-image-static-major-b0969b40-4c33-4f66-89a7-53bd393a769d Major
Reporter: slauriere
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. TestClass.xml contains two field declarations. The second one needs to be removed for building version 1.0, and added to build version 1.1.

 
 

3 updates

 
cid:jira-generated-image-avatar-fbc2b77c-4ff5-4c94-89f3-7b44b7a9b2df Changes by slauriere on 10/Mar/25 17:20
 
Attachment: org.xwiki.contrib.test-1.0.zip
Attachment: diff-current-next.png
Attachment: diff-current-merged.png