Uploaded image for project: 'ZZZ: PUBLIC - Old Liferay Portal (Use Liferay Portal Standard Edition)'
  1. ZZZ: PUBLIC - Old Liferay Portal (Use Liferay Portal Standard Edition)
  2. LEP-2310

Offer the developer more information when a StrutsPortlet has a wrong struts-path

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.2, 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      When a portlet uses the StrutsPortlet controler it has to create an entry called struts-path in its definition within liferay-portlet.xml. If the developer forgets or writes the wrong one (for example because of a typo) the portlet cannot be seen and shows an error saying that the user does not have enough permissions.

      This message might be ok for the user but is misleading to the developer, and can lead to a lot of lost time and headaches (I must confess it just happened to me). I suggest adding at least a trace log just before throwing the PrincipalException in PortletRequestProcessor line 318 such as:

      log.warn(
      "The struts path " + strutsPath + " does not belong" +
      " to portlet " + portlet.getPortletId() + ". Check " +
      " the definition in liferay-portlet.xml");

        Attachments

          Activity

            People

            Assignee:
            jorge.ferrer Jorge Ferrer
            Reporter:
            jorge.ferrer Jorge Ferrer
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                4.2.2
                4.3.0