lter / deims

The Drupal Ecological Information Management System install profile. Repo used for development.
http://drupal.org/project/deims
10 stars 16 forks source link

PASTA: the EML built in the PASTA object has incorrect URL to data-file #92

Open isangil opened 9 years ago

isangil commented 9 years ago

The EML generated and rendered by DEIMS is just fine.

Somehow, when we build the EML inside the PASTA module using the EMLDataSet : getEML method, the distribution element contains a url that is not proper, we would beed to render the drupalbase/root. I.e: forexeample, the in-EML URL that's about to be sent to PASTA looks like http://default/sites/default/files/DELTA_HYDRO.csv

While instead of "default", we should see the drupal-base for the site...

isangil commented 9 years ago

As a result, the insertion on PASTA fails, as PASTA is unable to download the data-file to do its checks.

After double checking, this may be an issue beyond the getEML method, as for this DEIMS isntance, the "download EML" also fails to produce a good URL.

hum.

isangil commented 9 years ago

OK - it is just complicated. In normal circunstances, the EML builds fine with the BASE URL strings. But when EMl is built by the getEML method, all URLs seem to loose the base url.

Immediately after, when you render the "dataset" using the theme engine (DEIMS theme), the URLs to the data-file and EML are also missing the drupal-base/root. After running cron once or twice, the BASE urls are restored properly. I am not sure how to go about this.

isangil commented 9 years ago

One not too elegant workaround is to replace the default with URL base before passing the file to PASTA. Id love to know why on earth does not inherit the baseurl at the time.