anvc / scalar

Born-digital, open source, media-rich scholarly publishing that’s as easy as blogging.
Other
231 stars 73 forks source link

IIIF/Mirador manifest issue #193

Closed kris-joseph closed 2 years ago

kris-joseph commented 2 years ago

Hi there,

I have an example of an IIIF manifest from the Library of Congress that isn't functioning on Scalar media import in v2.6.1

The item is located at https://www.loc.gov/resource/mss85590.103/ and the IIIF manifest is linked to the record as https://www.loc.gov/item/cosmos000105/manifest.json

I have verified that I can load the manifest directly into the Mirador viewer at https://mirador-dev.netlify.app/tests/integration/mirador/, but if I point the media import (or upload) to the manifest file (https://www.loc.gov/item/cosmos000105/manifest.json) the viewer only displays the raw JSON data. I've tinkered with variations on the URL but can't get the import to work.

Is this an issue, or am I missing something?

eloyer commented 2 years ago

This manifest is working on our end — can you send a link to the media item that's displaying the JSON? Also, can you confirm that you selected "IIIF Manifest" from the file type dropdown when importing?

kris-joseph commented 2 years ago

Hi there,

There's a public version of the media import page at https://scalar.library.yorku.ca/star-stuff/sagan-with-viking-lander-module

What I've noticed is that if I "edit" the media, the media type is listed as "Standard media" even though I was sure to set it to IIIF on import. If I change the media type to "IIIF Manifest" and save, and then go back to edit the media again, the field always defaults to "standard media." It's like the setting doesn't stick...?

This might explain why it's not displaying properly: it's just displaying the JSON file instead of interpreting it for Mirador. I've tried it across Firefox, Chrome and Safari just to see if it's a browser thing but the behaviour is always the same.

FWIW we recently upgraded from v2.5.10.

kris-joseph commented 2 years ago

A quick update: I looked at the code commits for the IIIF integration. On a hunch I manually added "?iiif-manifest=1" to the end of the content URL. After saving, the manifest and Mirador load properly. Sooooo.... I'm still confused but at least I have a workaround.

eloyer commented 2 years ago

Yep, that URL param is what tells Scalar that the media item is a IIIF manifest, so that workaround is solid. I'm not able to duplicate the "defaulting to standard media" behavior so far... does it happen every time you edit the media?

kris-joseph commented 2 years ago

Once the media has been correctly flagged as IIIF (with the workaround), it gets listed properly as an IIIF manifest... but before the workaround, it insists on keeping it as standard media even if I switch it to IIIF and Save or Save and View. It's definitely an odd behaviour, but with the workaround it's not any kind of showstopper :)

I'd be willing to set you up to access our server's front end if you want to take a quick look there?

eloyer commented 2 years ago

Yes, that'd be helpful — you can reach us at alliance4nvc@gmail.com.