This issue has been created
There are 3 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-644ca96a-1430-488c-b010-070e6ee6d736 XWIKI-22966 In Progress

Uninstalling an extension with an xclass page in subwiki doesn't select the page to be deleted

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-e97a5bff-d33c-41d0-9035-6bbef136f3c8 Simon Urli created this issue on 12/Mar/25 18:05
 
Summary: Uninstalling an extension with an xclass page in subwiki doesn't select the page to be deleted
Issue Type: cid:jira-generated-image-avatar-644ca96a-1430-488c-b010-070e6ee6d736 Bug
Affects Versions: 16.10.4
Assignee: Unassigned
Components: Filter
Created: 12/Mar/25 18:05
Priority: cid:jira-generated-image-static-major-cb31ca81-9c15-445b-91fa-399621e1473b Major
Reporter: Simon Urli
Description:

Reproduction steps:

  • Install change request in main wiki
  • Create a subwiki
  • From that subwiki install change request application
  • On the subwiki only uninstall change request application

Expected results:

  • the uninstall job propose to remove all pages from Change Request including ConfigurationClass

Obtained result:

  • All pages are selected for removal except ConfigurationClass
 
 

3 updates

 
cid:jira-generated-image-avatar-e97a5bff-d33c-41d0-9035-6bbef136f3c8 Changes by Simon Urli on 12/Mar/25 18:06
 
Attachment: screenshot-1.png
 
cid:jira-generated-image-avatar-6004470b-4671-43d4-88d3-82f27d771756 Changes by Thomas Mortagne on 12/Mar/25 18:11
 
Assignee: Thomas Mortagne
Status: Open In Progress
 
 

1 comment

 
cid:jira-generated-image-avatar-e97a5bff-d33c-41d0-9035-6bbef136f3c8 Simon Urli on 12/Mar/25 18:09
 

The investigation to debug this issue shows that the root problem is that BaseClassOutputFilterStream creates an xclass with a document reference relative to main wiki, instead of it being relative to the subwiki. More specifically, this call is resetting the value: https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-16.10.4/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/BaseClassOutputFilterStream.java#L68

Then when performing a comparison of the document in XarExtensionJobFinishedListener the previousDocument loaded with the bad reference and the current document are not equals, so the UI propose to keep the page.

I believe that this bug is also the root cause of XWIKI-22961.