Uploaded image for project: 'Magnolia Groovy Module'
  1. Magnolia Groovy Module
  2. MGNLGROOVY-143

Rescue app is broken due to i18n not being set up

    XMLWordPrintable

    Details

    • Sprint:
      Basel 53
    • Story Points:
      8

      Description

      Vaadin Terminal used in there tries to grab a SimpleTranslator, which is backed by TranslationService, which in turn requires the I18nModule via provider.

      Observations

      IMO problem is not the TranslationService is being instantiated properly or not. The problem appears to be the ModulesStartedEvent is not thrown and thus TranslationServiceImpl#messageBundles is null and therefore we have the NPE.

      Had the ModulesStartedEvent fired in the rescue app solves the situation thus proves the observations above (With reverting I18nModule#isDebug in TranslationServiceImpl ). TranslationServiceImpl#messageBundles used to be populated upon each request and rightfully changed with MAGNOLIA-6556 in a way that ModulesStartedEvent is consumed in the TranslationServiceImpl's constructor and leads to population of the TranslationServiceImpl#messageBundles.

      Proposed solution

      1) Having TranslationServiceImpl#messageBundles populated explicitly in the rescue app via TranslationService#reloadMessageBundles()
      2) Occurrences of i18nModuleProvider.get().isDebug() replaced with a method which returns false if i18nModuleProvider returns null or throws ProvisionException.

      Steps to reproduce

      • Use a repository that is working with version 5.3 of magnolia.
      • Stop Mgnl and start a mgnl with version 5.4.7 on the 5.3 Mgnl repository
        Be sure to configure the web.xml to enable the groovy rescue servlet
      • When the server is up and running no groovy rescue servlet appears

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ilgun Ilgun Ilgun
                Reporter:
                mgeljic Mikaël Geljić
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                    Checklists

                    Bug DoR
                    DoD

                      Time Tracking

                      Estimated:
                      Original Estimate - 4d
                      4d
                      Remaining:
                      Time Spent - 3d 0.5h Remaining Estimate - 7.5h
                      7.5h
                      Logged:
                      Time Spent - 3d 0.5h Remaining Estimate - 7.5h
                      3d 0.5h