Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-69862

Initialization bug when deploying modules with MBDisplayContextFactory or WikiDisplayContextFactory

Details

    Description

      There's an issue in the way the MBDisplayContextFactory and WikiDisplayContextFactory are registered that creates an issue when deploying new modules with those components in a specific order.

      The classes MBDisplayContextProvider and WikiDisplayContextProvider are not properly registering the components *DisplayContextFactory. They are using ServiceReference instead of the entity and that forces to have the _bundleContext bind, but it might not have been initialized because the references are satisfied before the activate method.

      Then, if there are pending *DisplayContextFactory before the *DisplayContextProvider is activated, the reference methods like setWikiDisplayContextFactory won't have the _bundleContext wired and it will fail when adding it to the map.

      The fix is to replace the map with a List and use the entity instead of the service reference so we no longer need the bundleContext.

      Attachments

        Activity

          People

            sylvia.luan Sylvia Luan
            sergio.gonzalez Sergio Gonzalez (Inactive)
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              6 years, 22 weeks, 6 days ago

              Packages

                Version Package
                7.0.0 DXP FP10
                7.0.0 DXP SP2
                7.0.3 CE GA4
                7.1.X
                Master