OPENDAP / hyrax

Get and build the Hyrax data server.
36 stars 12 forks source link

Viewers link is broken #12

Closed gaellafond closed 2 years ago

gaellafond commented 2 years ago

Hyrax versions I'm using the hyrax-ncwms docker container: https://hub.docker.com/r/opendap/hyrax_ncwms

This issue affect all versions after 1.16.4.

It is present in all the versions I have tested.

It doesn't affect version 1.16.4 and earlier.

Issue The viewers link from the OPeNDAP Hyrax web page is broken, for every hosted files.

Example For the dataset data/hdf5/grid_1_2d.h5, the viewers URL points to: http://localhost:8080/viewers?dapService=/opendap/hyrax&datasetID=///data/hdf5/ instead of http://localhost:8080/opendap/viewers/viewers?dapService=/opendap/hyrax&datasetID=/data/hdf5/grid_1_2d.h5

hyrax-broken-link

gaellafond commented 2 years ago

I believe something broke in the java code. The variables sent to the dap4Contents template are wrong. I haven't look at the code itself yet to figure out what change could have cause the issue.

However, I found a workaround to temporarily fix the issue. Instead of fixing the broken webStartService and datasetID variables, patch the template to output what it needs to output using other available variables. It's a dirty workaround, but it should work until a proper fix is provided.

File: /var/lib/tomcat/webapps/opendap/xsl/dap4Contents.xsl Change <a href="{$webStartService}/viewers?dapService={$dapService}&#38;datasetID={$datasetID}">viewers</a>

With <a href="/opendap/viewers/viewers?dapService={$dapService}&#38;datasetID={../@name}{@name}">viewers</a>

Please, do NOT commit this change to the source code base. This is not an appropriate fix, it's just a workaround.

gaellafond commented 2 years ago

The issue is not present in the latest version: 1.16.8-51

NOTE: The file is now found in:

/home/tomcat/apache-tomcat-9.0.65/webapps/opendap/xsl/dap4Contents.xsl