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

Data Provider not populating from external JSON api

    Details

    • Branch Version/s:
      7.1.x
    • Backported to Branch:
      Committed
    • Story Points:
      1
    • Fix Priority:
      4
    • OS:
      Windows 10
    • JDK:
      Oracle Sun JDK 8
    • Application Servers:
      Apache Tomcat 9.0.x
    • Browsers:
      Chrome (latest), Edge (latest)
    • Databases:
      MySQL 5.7
    • Device Type:
      Desktop
    • Sprint:
      F&W Sprint 6

      Description

       

      Attempting to use a Data Provider in the Forms builder with an external (non Liferay) JSON API and the provider never populates values in either an Autocomplete Text field or a Select From List field.  The API has been tested outside Liferay and returns results as expected.

      API is:

       

      https://data.cese.nsw.gov.au/data/api/3/action/datastore_search?resource_id=2ac19870-44f6-443d-a0c3-4c867f04c305&limit=2209

       

      (The second parameter limits the result set returned - the default return limit is 100.  2209 is the current total count)

      Field to be extracted is "School_name".

      JsonPath query I'm used is either of: 

       

      $.result.records..School_name
      $.result.records.[*].School_name
      

      Tested via https://jsonpath.curiousconcept.com/ which lets me both enter the URL and provide the JsonPath expression - and also tested via jsonpath.com by pasting the results from just accessing the URL.  Both work fine as expected and return a list of school names.

      However, with a Data Provider in DXP 7.1 no results are returned, ther are no errors in the browser console, and no errors in the Tomcat console.  Just nothing.

      Data Provider is setup with URL as above, User Name and Password blank. There is one output field called "School Name" with Path as above and Type as List.

      I have not been able to debug the code, but this was done by Renato Rêgo in relation to https://issues.liferay.com/browse/PTR-420 who indicated that an incorrect parameter was being applied to the URL.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  37 weeks, 2 days ago

                  Packages

                  Version Package
                  7.1.10 DXP FP8
                  7.1.10.2 SP2
                  7.1.3 CE GA4
                  7.1.X
                  Master