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

Cannot change a list property from multiple select to single select if there is an instance that has no value selected

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.2.5
    • Fix Version/s: 6.2.6, 6.4.2, 7.0-milestone-2
    • Component/s: Old Core
    • Labels:
      None
    • Tests:
      Unit
    • Development Priority:
      High
    • Difficulty:
      Trivial
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Follow this steps to reproduce:

      1. Create a class with only one property of type Database List
      2. Configure this property as multiple select
      3. Create a new page and add an object of this class but don't select any value for the Database List property
      4. Edit the class again and change the property from multiple select to single select. Save

      You get:

      A problem occurred while trying to process your request. Please contact the webmaster if this happens again.
      

      And the exception is:

      Caused by: java.lang.ClassCastException: com.xpn.xwiki.objects.ListProperty$NotifyList cannot be cast to java.lang.String
      at com.xpn.xwiki.objects.BaseStringProperty.setValue(BaseStringProperty.java:40)
      at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:666)
      ... 52 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mflorea Marius Dumitru Florea
                Reporter:
                mflorea Marius Dumitru Florea
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: