-
Notifications
You must be signed in to change notification settings - Fork 28
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
Conversation
Avoid trying to access an empty array
This changes the default file schema to |
@@ -59,4 +59,17 @@ protected function openSourceUrl($url) { | |||
|
|||
} | |||
|
|||
/** |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
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' |
There was a problem hiding this comment.
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.
Oh, just saw this was merged. Ignore my comments! |
Avoid trying to access an empty array, this just avoids the message getting dumped to the logs. It works either way.