gdcc / dataverse-previewers

A collection of Datafile Previewers that can be configured to work with Dataverse
MIT License
5 stars 15 forks source link

handle missing persistentId along with empty one #29

Closed qqmyers closed 1 year ago

qqmyers commented 1 year ago

Dataverse ~5.14 appears to switch behavior from sending an empty file persistentId when one doesn't exist (draft or not using file pids). This PR makes the core retriever script check for both cases when deciding what form of file retrieval URL to create in the header. Without this fix, opening a previewer in a separate page (the header isn't shown when the display is inline) causes an error when the file doesn't have a PID and it doesn't display the header or content.