In the live PDP, the proxy setup means this issue can't occur. It is strictly a development issue, but it's annoying enough we should consider fixing it.
Several of the ajax URLs in the pdp are constructed by taking the current URL and "going up a level". These URLs will be incorrect if you leave off the trailing slash at the end of a URL, when you are testing on your workstation or docker. The main page will work perfectly, but functionality that depends on subsidiary URLs like catalog.json ormetadata.json will go awry in subtle ways.
For example, the usual URL for the Gridded observations portal is:
http://server/gridded_observations/map/.
The catalog URL is:
../catalog/catalog.json
If the trailing slash is present, the catalog url will be generated as:
If the trailing slash is absent, the page will load normally, but will try to access the catalog at:
http://server/catalog/catalog.json
This will cause the dataset menu to be empty. Depending on how long it takes you to remember that this issue exists, you might spend a while chasing red herrings if you think your most recent code change caused the issue.
When I first started working on the PDP, back when the development setup and environment variables were more complicated, I lost days trying to figure out what in my setup was broken, but I'd just entered the URL wrong. Even now, it still catches me now and then (like just now).
In the live PDP, the proxy setup means this issue can't occur. It is strictly a development issue, but it's annoying enough we should consider fixing it.
Several of the
ajax
URLs in the pdp are constructed by taking the current URL and "going up a level". These URLs will be incorrect if you leave off the trailing slash at the end of a URL, when you are testing on your workstation or docker. The main page will work perfectly, but functionality that depends on subsidiary URLs likecatalog.json
ormetadata.json
will go awry in subtle ways.For example, the usual URL for the Gridded observations portal is:
The catalog URL is:
If the trailing slash is present, the catalog url will be generated as:
If the trailing slash is absent, the page will load normally, but will try to access the catalog at:
This will cause the dataset menu to be empty. Depending on how long it takes you to remember that this issue exists, you might spend a while chasing red herrings if you think your most recent code change caused the issue.
When I first started working on the PDP, back when the development setup and environment variables were more complicated, I lost days trying to figure out what in my setup was broken, but I'd just entered the URL wrong. Even now, it still catches me now and then (like just now).