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

Search portlet - view in context option doesn't work when it's disabled

    Details

      Description

      when the user search an user (for example), and he clicks in some result, if another page of the site has an asset publisher, the portal redirects to this page, even if the "view in context" option is unselected.

      The related code is in portal-web/docroot/html/portlet/search/main_search_result_form.jsp:

      if (viewInContext)

      { inheritRedirect = true; String viewFullContentURLString = viewFullContentURL.toString(); viewFullContentURLString = HttpUtil.setParameter(viewFullContentURLString, "redirect", currentURL); viewURL = assetRenderer.getURLViewInContext(liferayPortletRequest, liferayPortletResponse, viewFullContentURLString); }

      else

      { viewURL = viewFullContentURL.toString(); }

      It seems that it always generates a URL to the page with asset publisher.

      Steps to reproduce
      ===================
      Create two pages
      In first page, add a asset publisher
      In second page, add a search portlet
      Configure the search portlet unselecting "View in context"
      Search for a user
      When the user has been clicked, the page changes to the first page (where the asset publisher is displayed)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mark.jin Mark Jin (Inactive)
              Reporter:
              victor.miranda Victor Miranda (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 34 weeks ago

                  Packages

                  Version Package
                  6.1.30 EE GA3
                  6.2.0 CE M6