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

"Add Liferay as a Search Provider" produces JavaScript error

    Details

    • Fix Priority:
      5

      Description

      Steps to reproduce:

      (1) Place Search portlet on a page
      (2) Go to configuration, check Display Open Search Results, hit Save
      (3) Close popup, search for some test, e.g. test
      (4) scroll down to Open Search section
      (5) hit Add Liferay as a Search Provider button

      Result:
      JavaScript error is raised saying Error: Permission denied for <http://localhost:8080> to call method Sidebar.AddSearchProvider, see screenshot, nothing happens.

      Problem seems to be caused by the call in <portlet:namespace />addSearchProvider() in /html/portlet/search/search.jsp:192:

      Liferay.provide(
          window,
          '<portlet:namespace />addSearchProvider',
          function() {
              window.external.AddSearchProvider("<%= themeDisplay.getPortalURL() %><%= PortalUtil.getPathMain() %>/search/open_search_description.xml?p_l_id=<%= themeDisplay.getPlid() %>&groupId=<%= groupId %>");
          },
          ['aui-base']
      );
      

        Attachments

          Activity

            People

            Assignee:
            iliyan.peychev Iliyan Peychev
            Reporter:
            josef.sustacek Josef Šustáček
            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:
              7 years, 46 weeks, 2 days ago

                Packages

                Version Package
                6.2.0 CE M5