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

OpenSearch throws an ArrayIndexOutOfBoundsException and a NullPointerException

    Details

      Description

      Steps to Reproduce
      1- Create 1-2 arbitrary Web Contents by Test user.
      2- Goto http://localhost:8080/c/search/open_search?keywords=test

      Result:
      1- Status page loaded with "Internal Server Error" (See: LPS-47341-reproduced-1.png)
      2- Log entries:

      10:56:23,226 ERROR [http-bio-9080-exec-7][PortletRequestProcessor:466] Forward does not exist
      10:56:23,536 ERROR [http-bio-9080-exec-7][status_jsp:754] java.text.ParseException: Unparseable date: ""
      

      Note: In PortalOpenSearchImpl#search the following code would caused an NPE, if the first issue (ParseException) was solved:

      					String snippet = results.snippet(i);
      
      					Summary summary = indexer.getSummary(
      						result, snippet, portletURL, null, null);
      

      This is because we don't return such snippet in the "Hits" since LPS-28728, instead, we have dedicated fields to store the snippets.

      Expected result: See: LPS-47341-fixed-1.png

        Attachments

        1. Fixed in FireFox.png
          Fixed in FireFox.png
          35 kB
        2. Fixed in IE and Chrome.png
          Fixed in IE and Chrome.png
          176 kB
        3. LPS-47341-fixed-1.png
          LPS-47341-fixed-1.png
          66 kB
        4. LPS-47341-reproduced-1.png
          LPS-47341-reproduced-1.png
          91 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 8 weeks, 1 day ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.3 CE GA4
                  6.2.X EE
                  7.0.0 M2