GetDKAN / dkan

DKAN Open Data Portal
https://dkan.readthedocs.io/en/latest/index.html
GNU General Public License v2.0
366 stars 170 forks source link

Resources page not displaying content when using http://DKAN_SITE/path URL #1374

Closed lcshiung closed 7 years ago

lcshiung commented 7 years ago

Hi, previously under 7.x-1.11, we were able to host a site under http://DKAN_SITE/path. With 7.x-1.12, although we are still able to host the site in this way, when using the grid view in a data resource page, the data is no longer displayed. This is because the resource page calls the Datastore API to display the contents of the resource.

Under 7.x-1.11, the call to the Datastore API uses the full path - http://DKAN_SITE/path, e.g. http://DKAN_SITE/path/api/3/action/datastore_search?=&resource_id=0a206c28-5ff8-4aab-b5dd-6532bc5d2da8&limit=0

Under 7.x-1.12.10, the call to the Datastore API uses only http://DKAN_SITE/, e.g. http://DKAN_SITE//api/3/action/datastore_search?=&resource_id=d89f4c01-b12f-4a45-b572-aec341c237a3&limit=0

Just to add on, I resolved this by modifying line 157 of /profiles/dkan/modules/contrib/recline/recline.js from: endpoint: '/api'

to: endpoint: 'api'

dafeder commented 7 years ago

@lcshiung to get the ball rolling I've started a new PR with your change: NuCivic/recline#65

To be clear, the only place you see this bug manifest itself is on recline previews built from the datastore?

janette commented 7 years ago

Fixed.