Islandora-Collaboration-Group / ISLE

Islandora Enterprise (ISLE) is a community project that addresses two of the most significant pain-points in Islandora: installation and maintenance.
https://Islandora-Collaboration-Group.github.io/ISLE/
GNU General Public License v3.0
32 stars 34 forks source link

Replacing MODS datastream not working across all sample objects #167

Open g7morris opened 5 years ago

g7morris commented 5 years ago

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?

What's the actual result?

Additional details / screenshot / files

petermacdonald commented 5 years ago

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
g7morris commented 5 years ago

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.

br2490 commented 5 years ago

Related to #150

g7morris commented 5 years ago

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

br2490 commented 5 years ago

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

marksandford commented 5 years ago

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?