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

Mandatory classes does not upgrade completly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 5.4.5
    • Fix Version/s: None
    • Component/s: Old Core
    • Labels:
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Let's see XWikiPreferencesDocumentInitializer.

      needsUpdate |= bclass.addTextField("parent", "Parent Space", 30);
      

      Here, addTestField returns true only of the property "parent" did not exist before. The second argument is the pretty name.

      But if the property was already existing, it returns false, and does not upgrade the pretty name.

      It is the behaviour of every add*Field methods of the class BaseClass.

      In practice, it is not very important because DW does the upgrade with the XWikiPreferences that we have in the default XARs (that we need to maintain up to date by the way!).

      But in some circumstances, it could happen that the upgrade is not performed (see: XWIKI-11079).

      We should fix this issue by creating and use a setTextField method (and setBooleanField, etc...) that would also upgrade the properties of the field.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                gdelhumeau Guillaume Delhumeau
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: