Uploaded image for project: 'Magnolia Shop'
  1. Magnolia Shop
  2. MSHOP-185

Creation of a new shop fails when there are already two shops which have a price category with the same name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3.0
    • Labels:
      None

      Description

      The sampleShop has a price category called "standard-price". Now when you create a second shop and in its configuration you add again a price category called "standard-price" you will not be able to create a third shop:

      Caused by: java.lang.NullPointerException
      	at info.magnolia.ui.form.field.factory.SelectFieldFactory.buildOptions(SelectFieldFactory.java:151)
      	at info.magnolia.ui.form.field.factory.SelectFieldFactory.createFieldComponent(SelectFieldFactory.java:98)
      	at info.magnolia.ui.form.field.factory.SelectFieldFactory.createFieldComponent(SelectFieldFactory.java:73)
      	at info.magnolia.ui.form.field.factory.AbstractFieldFactory.createField(AbstractFieldFactory.java:108)
      	at info.magnolia.ui.dialog.formdialog.FormBuilder.buildReducedForm(FormBuilder.java:214)
      
      

      The reason for this is that IndexedContainer.addItem() returns null when the new "standard-price" is added.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              will Will Scheidegger
              Reporter:
              will Will Scheidegger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: