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

Increase robustness of ProductNavigationControlMenu Framework

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.3.5 CE GA6, 7.3.10 DXP GA1
    • Fix Version/s: 7.4.13 DXP GA1, Master
    • Component/s: Control Menu
    • Labels:
      None

      Description

      When a ProductNavigationControlMenuEntry implementation fails, it takes down the whole ControlMenu bar, with all other entries as well - e.g. leaving an unusable system now that it contains the global menu in that bar as well.

      Steps to reproduce:

      @Component(
      	immediate = true,
      	property = {
      		"product.navigation.control.menu.category.key=" + ProductNavigationControlMenuCategoryKeys.USER,
      		"product.navigation.control.menu.entry.order:Integer=1"
      	},
      	service = ProductNavigationControlMenuEntry.class
      )
      public class DocumentationToastControlMenuEntryProductNavigationControlMenuEntry
      	extends BaseProductNavigationControlMenuEntry
      	implements ProductNavigationControlMenuEntry {
      
      ...
      
      }

      Have your IDE implement all the overridden and necessary methods, or implement any of the parent implementation yourself, simulating a malfunction, e.g.

      	@Override
      	public boolean isShow(HttpServletRequest request) throws PortalException {
      		throw new NullPointerException();
      	}

      This works for many different methods - deploying this ControlMenuEntry will make the whole ControlMenu disappear.

      Expected behavior: The system stays usable and a faulty component doesn't render the whole system unusable. Failure should be contained within the failing component and exceptions caught & logged.

        Attachments

          Activity

            People

            Assignee:
            yang.cao Yang Cao
            Reporter:
            olaf.kock Olaf Kock
            Participants of an Issue:
            Recent user:
            Sophia Zhang
            Engineering Assignee:
            Eudaldo Alonso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              47 weeks ago

                Packages

                Version Package
                7.4.13 DXP GA1
                Master