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

Creating a subwiki with a flavor depending on the standard subwiki flavor with custom XWikiPreferences raises conflict error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 14.7-rc-1, 14.4.4, 13.10.9
    • 14.4.2
    • Flavor
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce

      • Create subwiki
      • Customize the subwiki XWikiPreferences, for instance by removing the "comment" right granted by default to XWikiAdminGroup
      • Export the customized XWikiPreferences
      • Create a Maven custom flavor project "myflavor"
      • In "myflavor" POM, add a dependency on org.xwiki.platform:xwiki-platform-distribution-flavor-wiki
      • Add the custom XWikiPreferences to the myflavor project in src/main/resources
      • Build "myflavor" and edit XWiki's META-INF/extensions.xed to declare this flavor as a known flavor.
      • Create a subwiki based on "myflavor"
      • Go back to the WikiManager and create a second subwiki based on "myflavor".

      Actual result

      For the first subwiki,the installation goes as expected. However fot the second one, the wiki creation log contains an error "Collision found on object XWiki XWikiPreferences" and the custom XWikiPreferences is not deployed. Page XWikiPreferences has the following history:

      Version coming from extension Base Flavor Application 14.4.2 	Rollback 	
      Version coming from extension MyFlavor 1.0-SNAPSHOT 	Rollback 	
      3.1 	Admin 	2022/08/08 16:28 	Install extension [org.xwiki.contrib:myflavor/1.0-SNAPSHOT] 	Current version Delete
      2.1 	Admin 	2022/08/08 16:28 	Install extension [org.xwiki.platform:xwiki-platform-distribution-ui-base/14.4.2] 	Rollback 	Delete
      1.1 	Admin 	2022/08/08 16:27 	Synced mandatory class property definitions to default values 	Rollback 	Delete
      

      On the first subwiki, the history of XWikiPreferences does not contain entry "org.xwiki.platform:xwiki-platform-distribution-ui-base".

      Expected result

      No object collision error is raised on flavor deployment and the custom XWikiPreferences is deployed in subwiki.

      Note that when proceeding in two steps: 1) wiki provisioning with empty flavor, 2) custom flavor installation, no error is raised and the custom XWikiPreferences is installed as expected.

      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: