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

    XMLWordPrintable

Details

    • Unit
    • High
    • Trivial
    • N/A
    • N/A

    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

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

              Dates

                Created:
                Updated:
                Resolved: