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

"Parse error. '}' expected [JSC_PARSE_ERROR]" on Classic Search configuration dialog

    Details

      Description

      Some functional tests on Classic Search (ClassicSearch#SearchTwiceScopeEverything, ClassicSearch#SearchTwiceScopeLetUserChoose, ClassicSearch#SearchTwiceScopeThisSite etc.) are failing due to JavbaScript errors in the configuration dialog. We see this error message on JavaScript console from CI:

      Parse error. '}' expected [JSC_PARSE_ERROR] 

      Steps to reproduce

      1. Login in into portal with admin account.
      2. Add the Classic Search Portlet to some page.
      3. Open broswer's dev tools/JS console.
      4. Go to the configuration dialog from the Clasisc Search Portlet.
      5. Observe browser's console.

      Expected results

      • Nothing would happen.

      Actual results

      • An error message appears:
        Uncaught SyntaxError: Unexpected token .
        

      Root cause

      By going to the line in JavaScript that cause the errors, we see this:

      Liferay.Util.postForm(form, {
      	data: {
      		com.liferay.portal.search.web.internal.facet.AssetEntriesSearchFacetassetTypes: Liferay.Util.listSelect(
      			currentAssetTypes
      		)
      	}
      });
      

      The key in the object is a class name, but it is not quoted. This quotation was removed by 916ef83; for some reason, it only caused issues now.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              linda.sui Linda Sui
              Reporter:
              adam.brandizzi Adam Brandizzi
              Participants of an Issue:
              Recent user:
              Jason Pince
              Engineering Assignee:
              Adam Brandizzi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                48 weeks, 4 days ago

                  Packages

                  Version Package
                  7.2.10 DXP FP6
                  7.2.X
                  7.3.0 CE GA1
                  7.3.10 DXP GA1
                  Master