Closed mephillips-durham closed 3 months ago
The following is a reproduction of this issue using a Stanford IIIF manifest.
As you can see, the preview images are not rendered in the items tab:
Not rendered in the individual item view:
Or in the item edit view:
The pictures are viewable as thumbnails when creating a static slideshow:
And are displayed properly in the Feature Page when displayed as a static slideshow:
However, when displayed in a viewer window, the image is not correctly rendered:
Inspecting the elements shows that the viewer is not rendered at all:
This spotlight instance was instantiated on an ubuntu vagrant box using the following script:
echo "Start of bundle-install.sh"
# Spotlight
cd
if [ ! -e dur-spotlight/app ]; then
echo "Spotlight bundle install"
# Need these lines for initial provisioning, as parent environment has not yet had these executed
source $HOME/.asdf/asdf.sh
source $HOME/.asdf/completions/asdf.bash
# Create new Spotlight application
SKIP_TRANSLATION=1 rails new dur-spotlight --quiet -m https://raw.githubusercontent.com/projectblacklight/spotlight/main/template.rb
cd dur-spotlight
SKIP_TRANSLATION=1 rake db:migrate
# Make corrections to generated manifest.js
cd
sed -i 's/js\/\//js\n\/\//' dur-spotlight/app/assets/config/manifest.js
sed -i 's/^\/\/= link application.js$//' dur-spotlight/app/assets/config/manifest.js
cd
cat <<EOF >> dur-spotlight/.solr_wrapper.yml
# Added by bundle-install.sh to persist data
persist: true
# Added by bundle-install.sh to avoid data being kept in /tmp
download_dir: /home/vagrant/tmp
instance_dir: /home/vagrant/solr_data
# Added by bundle-install.sh to listen on all addresses
env:
SOLR_JETTY_HOST: 0.0.0.0
EOF
fi
echo "End of bundle-install.sh"
This is fixed by version v0.7.0 of openseadragon-rails: https://rubygems.org/gems/openseadragon/versions/0.7.0
In a freshly-bootstrapped rails application based on the Spotlight engine, any images, whether static or IIIF, are only shown in the brief results screens and do not appear in the full record display. This is not helpful to new users, who may struggle to work out how to add the images. Most users will want images displayed on the full record view.
By contrast, when you Edit a record, clicking the Edit button from the full record display, the images are shown. It appears this is because the edit screens use an older mechanism. I wonder whether the images disappeared from the default full record display when Blacklight moved to using View Controllers?
I don't know whether there is a very simple fix that I have not found, and I don't know whether it needs addressing in Spotlight or in Blacklight.
Background investigations
If I turn on diagnostics in the rendering so that the HTML is marked up with the template filenames using
then in the normal full record display we have these templates in use:
The metadata_field_component would be repeated for each metadata field in the record, displaying each in a new row with the field name on the left. I would expect the document_component.rb to generate or include something to make the image appear. It does make a couple of lines appear with "og" metadata for use by Facebook etc.:
But there is no
By contrast, if we look at the templates used in the Edit view of the record, we get these:
and others which follow to make the form elements appear. The _openseadragon_default.html.erb template makes the IIIF viewer appear.
On our previous attempt to implement Spotlight, in August 2021, we had replaced this with Mirador, and that was good for both the editing view and the full record view. Repeating that modification with the latest Spotlight and Blacklight now only affects the editing view, and the full record display has no image viewer, neither Mirador nor OpenSeadragon.