Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
244 stars 149 forks source link

ESRI Geoportal Search Widget within Web AppBuilder - Javascript API Version Bug #278

Closed AltitudeGIS closed 6 years ago

AltitudeGIS commented 7 years ago

Overview: At the BLM National Operations Center, we are beginning our Web AppBuilder (WAB) Developer’s Edition web app development and we also host a Geoportal public facing website named LADP (Landscape Approach Data Portal).

Recently we have had the need to create a custom web application that includes the Geoportal Search and the AddToMap widgets that would incorporate a federated search to our LADP.

Using the versions above, we ran into an issue where once we went through creating a custom WAB application using the custom Geoportal Search and AddToMap widgets; the widgets would not load when accessing the web app.

After intensive trouble shooting, we found that if we ‘roll back’ the Javascript API version from 3.20 to 3.16. This fixed the issue immediately!

In the following workflow, you’ll see the work around we’ve created to ‘roll back’ or ‘downgrade’ the Javascript API in step 12:

Workflow:

  1. Open up the Web AppBuilder Developer’s Edition Application & Specify the Test Portal URL, click Continue
  2. Create a new web app by clicking Create New
  3. Customize a default 2D app by giving it a title, selecting a basemap, etc.
  4. Add the Geoportal Search widget to the map by clicking the Widget header and then one of the empty widget containers:
  5. Locate the GeoportalSearch widget, select the icon, and click OK.
  6. Paste the following link into the text box located next to “Type in a federated Geoportal Catalog url” and click +Get Catalogs: https://landscape.test.blm.gov/geoportal Click OK to save the widget configuration.
  7. Save the newly created web app and then go back into the Web AppBuilder home screen by selecting the swirl WAB icon in the top left corner of the page:
  8. Download the app as a ZIP file to your local folder.
  9. Extract the zip file to a new folder on your local hard drive
  10. Copy newly extracted folder to a server location.
  11. Copy the AddToMap widget folder into your new map app folder’s widgets folder. 11a. Since the AddToMap widget doesn’t have a graphical interface, we’ll need to manually add the widget to the config.json file so it doesn’t show up in the app.
  12. Here the bug exists that requires the web app to ‘roll back’ or ‘downgrade’ the latest version of JavaScript API from 3.20 to 3.16. 12a. To update the API reference in the env.js file to 3.16 open up the following file and make the changes below: \\webserver\webappbuilder$\Geoportal_WebApp\env.js 12b. On line 92; change the reference for apiURL to match the following: apiUrl = '//js.arcgis.com/3.16'; 12c. On line 105; change the reference for apiURL to match the following: apiUrl = '//js.arcgis.com/3.16';
  13. Open the newly created application by going to the URLin a web browser

api_versionbug

Versions: Web AppBuilder Development edition v2.3 Geoportal v1.2.7

AltitudeGIS commented 6 years ago

Hi Support, has anyone had a chance to review our bug? Thanks!

AltitudeGIS commented 6 years ago

After implementing the version 1.2.8 of the web appbuilder widget, we are not experiencing this issue any longer. I'll mark this issue closed!