ISLE
ISLE copied to clipboard
Replacing MODS datastream not working across all sample objects
Issue description
Replacing
a MODS datastream doesn't seem to trigger a SOLR reindex of the object and as such the displayed metadata doesn't update to reflect changes.
If I attempt to view replaced
MODS, indeed the changes are there however not displayed in the metadata on the object page.
If I click the edit
link for the MODS record:
a) I see the newly replaced MODS. (huh?, I mean yes I should but then why not in the displayed metadata?)
b) if I click the update
button without making changes, THEN I see the newly updated MODS in the displayed metadata.
Please note: I've tested this process on a non-ISLE system and on an ISLE v10 system and it works everytime.
Steps to reproduce the issue
-
I login to my Drupal site as a Drupal admin.
-
Navigate to my Islandora Repository and choose my test collection.
-
Select my test object e.g. the ICG Video_03 Olivia's Arrival sample and choose "Manage"
-
Select "Datastreams"
-
Select "replace" under the 2nd row MODS / MODS Record
-
Upload a new MODS.xml file Video_02.xml which has different MODS. Yes it doesn't describe the same object but it should display none the less.
-
Click Add Contents
Please note: the original MODS used was Video_03.xml
- Review updated displayed title and
Details
section for changes.
What's the expected result?
- That I see different MODS values / fields displayed along with a title change e.g. the Video_02.xml MODS displayed in the
Details
section and the title should now displayBlues for C.M.
What's the actual result?
-
The same MODS values / fields PRIOR to the upload i.e. Video_03.xml are displayed in the
Details
section and the title is still displayingOlivia's Arrival
-
If I click
Manage > Datastreams > MODS
then I see the newly replaced MODS. -
If I click the
edit
link in the MODS row and then click theUpdate
button without making changes, THEN I see the newly updated MODS in the displayed metadata of theDetails
section.
Additional details / screenshot / files
-
The samples and files are from the ICG sample objects repo
-
I made a screen-share video of my testing steps, hoping that will be clearer on what I'm doing.
-
Log files from SOLR, Fedora and Gsearch at the time of replacement. I'm seeing updates but alas no results.
I think this is normal behavior for Islandora. That is, simply replacing a MODS datastream using the Manage > Datastreams > Replace MODS method does not update Solr. You also have to click "Edit" MODS and save it. But if you have Replaced a lot of MODS datastreams, you can prepare a list of PIDS and run the following shell script to get them indexed. [I'd be happy to learn of an easier way to do it.]
#!/bin/bash
FH=$FEDORA_HOME
USERNAME="fedoraAdmin"
PASSWORD="my_password"
HOST="fedora.hamilton.edu"
PORT="8080"
PROT="http"
PIDS="/home2/my_home/pids.txt"
cat $PIDS | while read line; do
curl -XPOST -u"$USERNAME:$PASSWORD" "$PROT://$HOST:$PORT/fedoragsearch/rest?operation=updateIndex&action=fromPid&value=$line"
done
Hmmm what is odd @petermacdonald is that on the non-ISLE and and previous ISLE systems is that act of replacing
the MODS appears to automatically update the displayed MODS in the Details
section. I just tested isle.localdomain
and same failure.
However I guess the better question is that given this is an unthemed Drupal site and with the ICG samples having different MODS schemas / structures etc, is this actually a problem?
Should one be expecting what @petermacdonald is describing (and I believe you @petermacdonald given your experience) or is it automatically updated?
Am I looking at the right output given the unthemed site, should I see changes in the Details
section or simply the title?
I just have conflicting results and am not familiar with this level of granularity.
Related to #150
@br2490 I think that makes sense now. Thanks for bringing that up. Indeed I was using @dwk2 's institution's MODS and sample objects. Perhaps @marksandford 's efforts to streamline MODS will resolve this. So I think this is NOT an ISLE issue but more testing required.
deep sigh of relief Thank you for this @g7morris, and all! Closing #150 as this now supersedes it.
So I'm trying to sort out of this is a MODS thing or not. At this point, I keep seeing the behavior @g7morris reported, regardless of what I do to the MODS. My latest attempt was to make a single character change to the MODS file downloaded from the Datastreams page and upload it again. Still not seeing the change reflected until I use the editor form. Can someone confirm a MODS file (In the sample directory or elsehwere) that behaves correctly?