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

            • Assignee:
              sylvia.luan Sylvia Luan
              Reporter:
              sergio.gonzalez Sergio Gonzalez (Inactive)
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 41 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