Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6400

Map2Bean tranformer throws NPE if definition class uses MgnlContext

    XMLWordPrintable

Details

    • Saigon 15, Saigon 18
    • 8

    Description

      For an example of this see info.magnolia.security.app.dialog.field.SystemLanguagesFieldDefinition. It has a method getOptions() which uses MgnlContext.

      When I configure this field in the JCR I never pass through SystemLanguagesFieldDefinition#getOptions(). So that is why we don't see this MgnlContext issue when configuring the dialog in JCR.

      On the other hand, when configuring in yaml, when I save the dialog I pass through SystemLanguagesFieldDefinition#getOptions() for whatever reason.

      The dialog is still usable but you do receive a warning when the dialog saves. A possible workaround would be to move the loading of options to the factory class or just ignore the warning.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                ngoc.nguyenthanh Ngoc Nguyenthanh
                rgange Richard Gange
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - 0.25d Original Estimate - 0.25d
                      0.25d
                      Remaining:
                      Time Spent - 5d 5h Remaining Estimate - 1d 7h
                      1d 7h
                      Logged:
                      Time Spent - 5d 5h Remaining Estimate - 1d 7h
                      5d 5h