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

Paged content from CONTENTdm has incorrect DSID for JPEG files #452

Closed
mjordan opened this issue Feb 19, 2018 · 2 comments
Closed

Paged content from CONTENTdm has incorrect DSID for JPEG files #452

mjordan opened this issue Feb 19, 2018 · 2 comments
Assignees
Labels

Comments

@mjordan
Copy link
Collaborator

mjordan commented Feb 19, 2018

Islandora objects that have the content models islandora:pageCModel and islandora:newspaperPageCModel, i.e., book and newspaper pages, use a datastream ID of 'JPG'. MIK's CONTENTdm toolchains write out a file with the name 'JPEG.jpg' (see https://github.com/MarcusBarnes/mik/blob/master/src/writers/CdmNewspapers.php#L209 and https://github.com/MarcusBarnes/mik/blob/master/src/writers/CdmBooks.php#L220). This filename determines the DSID used in Islandora if the content was batch loaded using islandora_book_batch or islandora_newspaper_batch. Therefore, paged content generated by MIK's CONTENTdm toolchains may have DSIDs that are inconsistent with the paged content composite model, depending no how the paged content was loaded into Islandora.

This bug does not affect other toolchains.

This bug is easy enough to fix, but in the interests of consistency and portability during future migrations, Islandora instances that have paged content with the improperly named datastreams should probably replace the JPEGs with JPGs. SFU's site have had these incorrectly named datastreams for over two years with no visible side effects, but we'll be offering a solution for fixing the problem.

@mjordan mjordan added the bug label Feb 19, 2018
@mjordan mjordan self-assigned this Feb 19, 2018
@mjordan
Copy link
Collaborator Author

mjordan commented Feb 19, 2018

Looks like the bug is very localized and the fix easy:

mik/src$ grep -r 'JPEG\.' *
writers/CdmNewspapers.php:                $jpg_output_file_path = $page_dir . DIRECTORY_SEPARATOR . 'JPEG.jpg';
writers/CdmBooks.php:                $jpg_output_file_path = $page_dir . DIRECTORY_SEPARATOR . 'JPEG.jpg';

mjordan added a commit that referenced this issue Feb 19, 2018
@mjordan mjordan mentioned this issue Feb 19, 2018
mjordan added a commit that referenced this issue Feb 20, 2018
bondjimbond added a commit that referenced this issue Feb 26, 2018
@mjordan
Copy link
Collaborator Author

mjordan commented Feb 26, 2018

Fix has been merged.

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

No branches or pull requests

1 participant