Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drupal URIs for files migrated from 7.x are not being populated correctly #1418

Open
mjordan opened this issue Feb 2, 2020 · 6 comments
Open
Labels
Subject: Migration Concerning migration from Islandora 7 to Islandora 2.x.x

Comments

@mjordan
Copy link
Contributor

mjordan commented Feb 2, 2020

Files migrated from 7.x are not getting the correct Drupal or Fedora URIs in Gemini. I'm migrating to an 8.x Islandora at 192.168.50.111:8000 from a 7.x whose Fedora is at 192.168.50.128:8080. Here is the Gemini record for a file that is 404ing when I view its migrated media in 8.x at http://192.168.50.111:8000/media/289 (404ing URL to file is http://192.168.50.111:8000/_flysystem/fedora/sundaytest_7_OBJ.jpg):

fedora_hash: 02b298d02dccf0faee9d5ab67e5c7a83164ff794e4d5f2edf4b79e83de3345cce7c2d41919391c506d5f9278cc83dec9f152a1804f3799d3a43fe19911c3ef90
drupal_hash: fe2a0280d3d7552ad083e8757dd835702bd48576bf05a8d88a06701662cf79cc600a7f7eb5fae9b21c359e68bed42bee41c22d37e328d60e2dd6230ed3f7ffef
       uuid: 83f6573c-1868-4e4b-a5b5-f9832802c060
 drupal_uri: http://default/_flysystem/fedora/sundaytest_7_OBJ.jpg
 fedora_uri: http://127.0.0.1:8080/fcrepo/rest/sundaytest_7_OBJ.jpg
dateCreated: 2020-02-02 10:51:04
dateUpdated: 2020-02-02 10:51:04

Looks like two things are happening:

  1. the Drupal URI is being populated with 'default'
  2. the Fedora URI is being populated with 127.0.0.1

The 'default' problem has come up before, in #1014.

As far as I can tell, the files are not ending up in Fedora at all. 7.x objects are being migrated as expected (http://192.168.50.111:8080/fcrepo/rest/83/f6/57/3c/83f6573c-1868-4e4b-a5b5-f9832802c060 results in a 404). My migrate_plus.migration.islandora_media.yml and migrate_plus.migration.islandora_files.yml files use fedora_base_url: 'http://192.168.50.128:8080/fedora'. My Islandora settings at admin/config/islandora/core show the Fedora URL value is "http://127.0.0.1:8080/fcrepo/rest/", which may explain the value in the fedora_uri field in Gemini, but it turns out that field in the settings config form is read only ('#attributes' => ['readonly' => 'readonly']) so I can't confirm that 😭

@seth-shaw-unlv
Copy link
Contributor

seth-shaw-unlv commented Feb 3, 2020

Did you trigger the migration using Drush or the WebUI? If using Drush, did you include the -l http://192.168.50.111:8000 flag? Leaving off that flag will result in the Drupal URI using 'default' for the host. Suuuupper annoying but it's what we have to do.

@mjordan
Copy link
Contributor Author

mjordan commented Feb 3, 2020

Same behavior with both, but I'll try the -l http://192.168.50.111:8000 flag this evening.

@mjordan
Copy link
Contributor Author

mjordan commented Feb 4, 2020

@seth-shaw-unlv that appears to have fixed the 'default' (full command: drush -y mim --group islandora_7x --uri=http://192.168.50.111:8000 --userid=1):

fedora_hash: f27ec177cf221694a942a6347c8d4b66da55c967edf7afb1999f7fea0ec9d9f0386f24f5d2dc6ed824cb1127734110d66fd5d41e1456d6de619d3ec62bfc2dc4
drupal_hash: a52ca18055ed3c4c3728210968cd7af3ccd7191708cab1a0df7057e18775aea98fe00cf14f9b14390a638bd38e6a7139c914a1fa31f95591c23f8c153ae42c58
       uuid: 6d1f6aea-5966-417b-b36f-53f480326897
 drupal_uri: http://192.168.50.111:8000/node/44
 fedora_uri: http://127.0.0.1:8080/fcrepo/rest/6d/1f/6a/ea/6d1f6aea-5966-417b-b36f-53f480326897
dateCreated: 2020-02-03 21:34:16
dateUpdated: 2020-02-03 21:34:16
221 rows in set (0.00 sec)

and things aren't 404ing any more. It's right there in the docs, sorry I didn't read them more carefully 😄

Is there a way to add that option if initiating a migration via the GUI?

@seth-shaw-unlv
Copy link
Contributor

🤷‍♂️. I stopped using the WebUI long ago. I thought it did it for you automatically but maybe there is a Drupal config thing going on.

@mjordan
Copy link
Contributor Author

mjordan commented Feb 4, 2020

I'll confirm that.

@mjordan
Copy link
Contributor Author

mjordan commented Feb 4, 2020

OK, I'm losing it. Running the Islandora Media migration from the GUI is not triggering the other migrations, as it's supposed to (and as it did on this VM two days ago). I'll look into why that's not working.

@kstapelfeldt kstapelfeldt added Subject: Migration Concerning migration from Islandora 7 to Islandora 2.x.x and removed migration labels Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Subject: Migration Concerning migration from Islandora 7 to Islandora 2.x.x
Projects
Development

No branches or pull requests

3 participants