Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-3637

SystemLanguagesFieldDefinition should not build options in getter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 5.4.4
    • 5.4.2
    • security app
    • Basel 19, Saigon 26
    • 5

    Description

      SystemLanguagesFieldDefinition builds options in getter, using MgnlContext.

      Making definitions return contextual info (e.g. currentLocale) defeats the purpose of having a single, valid, reliable configuration for all, and must be avoided. It might lead to errors when accessing definitions outside of any Context (as occurred in linked issue).

      • Definitions should always be stupid POJOs.
      • The logic in #getOptions() should be moved to a custom SelectFieldFactory, overriding #getSelectFieldOptionDefinition()
      • The FieldTypeDefinition should be registered in in JCR config, under security-app module.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                ngoc.nguyenthanh Ngoc Nguyenthanh
                mgeljic Mikaël Geljić
                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 - 2d Original Estimate - 2d
                      2d
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 3.5d
                      3.5d