Fix #12303: Evaluating IIIF metadata values dspace.iiif.enabled and iiif.search.enabled correctly#5541
Fix #12303: Evaluating IIIF metadata values dspace.iiif.enabled and iiif.search.enabled correctly#5541marsaoua wants to merge 1 commit into
Conversation
…iif.search.enabled correctly
nwoodward
left a comment
There was a problem hiding this comment.
Thanks @marsaoua. This fixes an obvious bug with dspace.iiif.enabled being interpreted incorrectly. I tested it locally, and it fixes the behavior of the IIIF viewer for values like false, null, true, etc.
There is still a problem when an item has the metadata field dspace.iiif.enabled set to to true, but iiif.enabled = false in [dspace]/config/modules/iiif.cfg is set for the entire repository. In that case the IIIF viewer appears on the simple item page even though it shouldn't, and it's empty.
|
@nwoodward Thank you for the review it's much appreciated! Good point! |
Using the double negation (!!) in
dspace-angular/src/app/core/utilities/item-iiif-utils.ts
Line 16 in ffcca7d
dspace.iiif.enabled = falsethe check will incorrectly treatfalseasenabledresulting to the error described in DSpace/DSpace#12303References
Add references/links to any related issues or PRs. These may include:
Description
False/false,null, andundefinedare handled safely. OnlyTrue\trueis matched.Instructions for Reviewers
Edit an existing or create an item with a metadata value
dspace.iiif.enabled = falseChecklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.