Uploaded image for project: 'Magnolia Shop (closed)'
  1. Magnolia Shop (closed)
  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

    • Bug
    • Resolution: Fixed
    • Neutral
    • 2.3.0
    • 2.2
    • 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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD