Details

    • Type: Bug Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 6.0.6 GA, 6.1.0 CE RC1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Tomcat 6.0.32, Windows 7, SQL 2008, MVCPortlet
    • Fix Priority:
      3
    • Liferay Contributor's Agreement:
      Accept
    • Similar Issues:
      Show 3 results 

      Description

      Defining a renderURL thus:

      <liferay-portlet:renderURL varImpl="myURL" secure="true">
      <liferay-portlet:param name="jspPage" value="/myPage.jsp"/>
      </liferay-portlet:renderURL>

      Were the server is currently running in an unsecure fashion, i.e. http://mydomain.com:8080/
      Incorrectly results in a URL of https://mydomain.com:8080/...

      Note the port number, this should have been changed to 8443 for my instance.

      The issue occurs because in PortletURLImpl in the generateToString method, there is the following code at line 750:

      if (layout != null) {
      _layoutFriendlyURL = GetterUtil.getString(
      PortalUtil.getLayoutFriendlyURL(layout, themeDisplay));

      if (_secure)

      { _layoutFriendlyURL = HttpUtil.protocolize( _layoutFriendlyURL, true); }

      }

      HttpUtil.protocolize does not update the port number to the correct port.

        Activity

        Hide
        Richard Gibson added a comment -

        This is on my list of items to test, I hope to have time later this week.

        Show
        Richard Gibson added a comment - This is on my list of items to test, I hope to have time later this week.
        Hide
        Richard Gibson added a comment -

        Please note, the original issue can only be reproduced when Liferay is running multiple instance and you access an instance that is not Localhost.

        Show
        Richard Gibson added a comment - Please note, the original issue can only be reproduced when Liferay is running multiple instance and you access an instance that is not Localhost.
        Hide
        Richard Gibson added a comment -

        The supplied solution does NOT fix the problem.

        Firstly:
        url.replaceAll(StringPool.COLON + port, StringPool.BLANK);
        does nothing, it should be:
        url=url.replaceAll(StringPool.COLON + port, StringPool.BLANK);
        i.e. assign back to the url variable

        If the above change is made, you end up with a URL such as:
        http://myhost.com/home:8443

        This is incorrect, it should be:
        http://myhost.com:8443/home

        Show
        Richard Gibson added a comment - The supplied solution does NOT fix the problem. Firstly: url.replaceAll(StringPool.COLON + port, StringPool.BLANK); does nothing, it should be: url=url.replaceAll(StringPool.COLON + port, StringPool.BLANK); i.e. assign back to the url variable If the above change is made, you end up with a URL such as: http://myhost.com/home:8443 This is incorrect, it should be: http://myhost.com:8443/home
        Hide
        Richard Gibson added a comment -

        See previous comments

        Show
        Richard Gibson added a comment - See previous comments
        Hide
        Edward Gonzales added a comment -

        Hello everyone! We are in the process of removing component "Liferay TagLib" from LPS issues that contain more than one component. For issues that only have "Liferay TagLib", we plan to move to them to "Tools > Portal Taglibs". In the end, "Liferay TagLib" will be deprecated. Please make the necessary adjustments to your filters. Thanks!

        Show
        Edward Gonzales added a comment - Hello everyone! We are in the process of removing component "Liferay TagLib" from LPS issues that contain more than one component. For issues that only have "Liferay TagLib", we plan to move to them to "Tools > Portal Taglibs". In the end, "Liferay TagLib" will be deprecated. Please make the necessary adjustments to your filters. Thanks!

          People

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

            Dates

            • Created:
              Updated:
              Days since last comment:
              2 years, 5 weeks ago

              Development

                Structure Helper Panel