Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9309

Ecommerce component showing error screen on searchContent from showcontenttree page

    Details

      Description

      Steps to reproduce:
      1.Go to Ecommerce component (https://localhost:8443/ecommerce/control/main)
      2.Click on any of the Content from "Browse Content" section of left panel.It will be directed to https://localhost:8443/ecommerce/control/showcontenttree?contentId=STORE_POLICIES&nodeTrailCsv=STORE_POLICIES
      3. Click on Search, it directs to https://localhost:8443/ecommerce/control/searchContent?siteId=STORE_POLICIES
      4. Screen renders with ScreenRenderingException

      1. OFBIZ-9309.patch
        3 kB
        Aditya Sharma
      2. screenshot-1.png
        77 kB
        Aditya Sharma
      3. screenshot-2-whenNoIndex.png
        74 kB
        Aditya Sharma

        Activity

        Hide
        aditya.sharma Aditya Sharma added a comment -

        Problem:
        1. "searchContent" request directs to "searchContent" screen in ContentScreens.xml.
        2. On searchContent screen, "/ecommerce/groovyScripts/content/Search.groovy" script prepares and hits a search query to Lucene.
        3. "BooleanQuery" class is used to match documents with other boolean query combinations.
        4. BooleanQuery object is initialised with Its default constructor.
        5. With Lucene 5.4.0, this constructor is deprecated.
        OFBiz migrated to Lucene 6.3.1:
        OFBIZ-8316
        Solution:
        From Lucene 5.4.0 default constructor is deprecated and a new inner class Builder is created for queries.
        Refer OFBIZ-9301 for detailed explanation.

        Show
        aditya.sharma Aditya Sharma added a comment - Problem: 1. "searchContent" request directs to "searchContent" screen in ContentScreens.xml. 2. On searchContent screen, "/ecommerce/groovyScripts/content/Search.groovy" script prepares and hits a search query to Lucene. 3. "BooleanQuery" class is used to match documents with other boolean query combinations. 4. BooleanQuery object is initialised with Its default constructor. 5. With Lucene 5.4.0, this constructor is deprecated. OFBiz migrated to Lucene 6.3.1: OFBIZ-8316 Solution: From Lucene 5.4.0 default constructor is deprecated and a new inner class Builder is created for queries. Refer OFBIZ-9301 for detailed explanation.
        Hide
        aditya.sharma Aditya Sharma added a comment - - edited

        Additional changes:
        Moved code to "open index files" inside try-catch block as when not handled it may give ScreenRendering error when no index found. Attaching screenshot for the case.
        Updated error message from UILabel.

        Show
        aditya.sharma Aditya Sharma added a comment - - edited Additional changes: Moved code to "open index files" inside try-catch block as when not handled it may give ScreenRendering error when no index found. Attaching screenshot for the case. Updated error message from UILabel.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Aditya,

        Your patch is in
        trunk r1790810
        R16.11 r1790811 (handled by hand)

        I must say here that your descriptions and comments in Jira are exemplary and we could refer to them as how it should be done! Thanks!

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Aditya, Your patch is in trunk r1790810 R16.11 r1790811 (handled by hand) I must say here that your descriptions and comments in Jira are exemplary and we could refer to them as how it should be done! Thanks!
        Hide
        aditya.sharma Aditya Sharma added a comment -

        Thank you for the kind words Jacques.

        Show
        aditya.sharma Aditya Sharma added a comment - Thank you for the kind words Jacques.

          People

          • Assignee:
            jacques.le.roux Jacques Le Roux
            Reporter:
            aditya.sharma Aditya Sharma
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development