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

    • 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

            iliyan.peychev Iliyan Peychev
            josef.sustacek Josef Šustáček
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 47 weeks, 2 days ago

              Packages

                Version Package
                6.2.0 CE M5