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

Use fedora for original files #4

Merged
merged 1 commit into from
Aug 22, 2018

Conversation

whikloj
Copy link
Member

@whikloj whikloj commented Aug 21, 2018

Avoid trying to access an empty array, this just avoids the message getting dumped to the logs. It works either way.

Avoid trying to access an empty array
@whikloj
Copy link
Member Author

whikloj commented Aug 21, 2018

This changes the default file schema to fedora: to use flysystem.
Islandora/documentation#895

@@ -59,4 +59,17 @@ protected function openSourceUrl($url) {

}

/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks good to me. I haven't tested an actual source that has zero urls, however.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be an issue with the way my source plugin works. I was migrating 6 basic images and would constantly see an exception in the Drupal logs between item 5 and 6 and it seemed that the migration was trying to get more URLs and there aren't any. It might also be due to the fact that for whatever reason the migrate_plus DataParserBase doesn't process the entire array of urls but rather stops before the last one.

Copy link
Member

@dannylamb dannylamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dannylamb dannylamb merged commit ea97c67 into Islandora-Devops:master Aug 22, 2018
@ppound
Copy link

ppound commented Aug 22, 2018

This seems to be working as expected. If I run the migrations I get the expected content in Drupal, the OBJ binaries are making it to Fedora and their URLS when viewing in Drupal look like http://localhost:8000/_flysystem/fedora/masters/testing_8.jpg. The service file and thumbnails are being stored on the Drupal file system but I'm guessing that is expected?

@@ -29,7 +29,7 @@ source:
item_selector: /foxml:digitalObject

constants:
destination_directory: 'public://masters'
destination_directory: 'fedora://masters'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working in my setup.

@patdunlavey
Copy link

Oh, just saw this was merged. Ignore my comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants