ISLE icon indicating copy to clipboard operation
ISLE copied to clipboard

Replacing MODS datastream not working across all sample objects

Open g7morris opened this issue 6 years ago • 6 comments

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

  1. I login to my Drupal site as a Drupal admin.

  2. Navigate to my Islandora Repository and choose my test collection.

  3. Select my test object e.g. the ICG Video_03 Olivia's Arrival sample and choose "Manage"

  4. Select "Datastreams"

  5. Select "replace" under the 2nd row MODS / MODS Record

  6. 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.

  7. Click Add Contents

Please note: the original MODS used was Video_03.xml

  1. 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 display Blues 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 displaying Olivia'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 the Update button without making changes, THEN I see the newly updated MODS in the displayed metadata of the Details section.

Additional details / screenshot / files

g7morris avatar Sep 19 '18 19:09 g7morris

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

petermacdonald avatar Sep 20 '18 19:09 petermacdonald

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.

g7morris avatar Sep 20 '18 20:09 g7morris

Related to #150

br2490 avatar Sep 21 '18 12:09 br2490

@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.

g7morris avatar Sep 21 '18 14:09 g7morris

deep sigh of relief Thank you for this @g7morris, and all! Closing #150 as this now supersedes it.

br2490 avatar Sep 21 '18 14:09 br2490

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?

marksandford avatar Sep 21 '18 15:09 marksandford