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

Error in log when creating url with liferay-portlet:renderURL and target portlet does not have current portletMode

    Details

      Description

      I have two portlets:

      portletA – has modes VIEW and EDIT
      portletB – has mode VIEW

      In portletA's JSP, I'm using <liferay-portlet:renderURL portletName="portletB" portletMode="view" /> to create URL to portletB. If this JSP is used when portletA is in EDIT mode,
      Result: Error is raised in log, saying:

      17:12:09,792 ERROR [PortletResponseImpl:365] edit
      

      This is caused by fact, that com.liferay.taglib.portlet.RenderURLTag.doTag()(method defined in ActionURLTag) first creates URL with portletMode retrieved from current portlet request:

      LiferayPortletURL liferayPortletURL = _getLiferayPortletURL(
      			request, plid, portletName, lifecycle);
      

      In my case, it's portletA's request, having portletMode EDIT. This causes ERROR in log. As doTag() moves on, it sets portletMode to VIEW as defined in tag and URL is created and rendered in JSP correctly.

      The only problem here is misleading ERROR in log, when there is no problem (my first idea when I spotted the error repeating in log was digging for some unsupported portletMode in portletB).

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 37 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 DXP FP25
                7.0.X EE
                7.0.4 CE GA5
                Master