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

Fix errors when OCR field not set. #916

Merged
merged 1 commit into from
Dec 13, 2022
Merged

Conversation

rosiel
Copy link
Member

@rosiel rosiel commented Dec 8, 2022

GitHub Issue: n/a

What does this Pull Request do?

Fixes Drupal Error Log messages:

Notice: Trying to get property 'definition' of non-object in Drupal\islandora_iiif\Plugin\views\style
\IIIFManifest->getTileSourceFromRow() (line 208 of /var/www/html/drupal/web/modules/contrib/islandora/modules
/islandora_iiif/src/Plugin/views/style/IIIFManifest.php) 

What's new?

Do a check that $ocrfield isn't null before asking for its ->definition.

  • Does this change add any new dependencies? no
  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? no
  • Could this change impact execution of existing code? no

How should this be tested?

Make some content that can show up in an IIIF viewer using a manifest. Don't set up OCR (I didn't know you could set up OCR!) This also works if you go to the IIIF Manifest view, and use the preview function. Render the view (or click Preview) and you get errors in the logs like the one above.

With this PR: no errors.

Documentation Status

  • Does this change existing behaviour that's currently documented? no
  • Does this change require new pages or sections of documentation? no
  • Who does this need to be documented for? no
  • Associated documentation pull request(s): ___ or documentation issue ___ n/a

Additional Notes:

Any additional information that you think would be helpful when reviewing this
PR.

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora/committers

@jordandukart jordandukart merged commit 5472f6d into Islandora:2.x Dec 13, 2022
@rosiel rosiel deleted the fix-iiif branch December 14, 2022 14:55
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.

2 participants