Metadata.do from question mark in annotations is failing
Opened this issue · 1 comments
Reported by @karlmsmith on 20 Jan 2016 00:46 UTC
Mashing the question mark in the annotations for SOCAT plots:
http://ferret.pmel.noaa.gov/SOCAT_Data_Viewer/getMetadata.do?dsid=SOCAT%20v3%20data%20collection
gives a failure:
HTTP Status 404 - Request contains an illegal LAS ID query parameter value.
I am not sure if the spaces (%20) are causing the problem. I could replace the spaces in the name with underscores, although it would not look quite as nice. But was not sure if that was the problem.
I did notice that if I either remove the dsid or request with underscores instead of spaces in the above, so either:
http://ferret.pmel.noaa.gov/SOCAT_Data_Viewer/getMetadata.do
or:
http://ferret.pmel.noaa.gov/SOCAT_Data_Viewer/getMetadata.do?dsid=SOCAT_v3_data_collection
I get back a traceback on the page:
VelocityViewServlet : Error processing a template for path '/productserver/templates/metadata.vm'
Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at /productserver/templates/metadata.vm[line 16, column 32]
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:635)
at java.util.ArrayList.get(ArrayList.java:411)
...
(The name of the dataset in socat_erddap.xml is still with the spaces, so presumably the underscore one does not match anything and so goes to the same as if no dsid given.)
Migrated-From: http://dunkel.pmel.noaa.gov/trac/las/ticket/1722
Comment by @noaaroland on 21 Jan 2016 23:03 UTC
The issue is that the value on the query parameter for the data set id is wrong.
The value is the data set title: SOCAT v4 data collection
The value should be the ID which is socatV3_c6c1_d431_8194 which is passed in to Ferret as below.
DEFINE SYMBOL data_0_dataset_ID = socatV3_c6c1_d431_8194
The annotations file has the wrong value. It has:
It should be:
And if it were so, then this:
http://dunkel.pmel.noaa.gov:8920/socat4/getMetadata.do?dsid=SOCAT%20v4%20data%20collection
would become this:
http://dunkel.pmel.noaa.gov:8920/socat4/getMetadata.do?dsid=socatV3_c6c1_d431_8194
I had a look at the Ferret scripts and I cannot figure out why things are going wrong. The ID appears to get written from the symbol, but so does a symbol called dataset_ID_lab which I cannot find defined anywhere else in the scripts. So, over to Ansley...