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

Navigating to a canvas page after a IIIF manifest import displays error #107

Open
doingandlearning opened this issue Jun 24, 2019 · 2 comments
Labels
bug Something isn't working i18n Internationalisation

Comments

@doingandlearning
Copy link

What I did:

  • I used the base install of madoc-platform, running madoc init and madoc start with no changes to the config
  • I logged as the admin user
  • I selected Create IIIF Manifest from the side panel and left all other items blank
  • I clicked Add
  • I monitored the IIIFStorage\Job\ImportCanvases until the status was Completed
  • I ran an empty search on the front end
  • I see all of the item results
  • I click on one result

What I expect to see:

  • A view related to the IIIF item

What I see instead:

  • An error Omeka S encountered an error
  • The log file says: "2019-06-24T11:36:50+00:00 ERR (3): TypeError: Argument 2 passed to IIIF\Model\Canvas::__construct() must be of the type string, array given, called in /srv/omeka/repos/iiif-php/src/Model/Canvas.php on line 190 and defined in /srv/omeka/repos/iiif-php/src/Model/Canvas.php:62"

What I've done to fix it:

  • I've removed the type-hint from the $label variable as the IIIF ImportCanvases job has created arrays here.
@stephenwf
Copy link
Member

Thanks for the bug report @doingandlearning

I believe this is related to the internationalisation work done recently, where labels and other descriptive properties will be language maps, instead of just strings.

Another possible interim fix, without a code change: Go to http://localhost:8888/admin/module and enable the i18n module, checking the first checkbox when the configuration comes up.

Also in the site settings (http://localhost:8888/admin/site/s/default/settings) checking the configuration "Multi-lingual site". That should ensure that one language is chosen.

@stephenwf stephenwf added bug Something isn't working i18n Internationalisation labels Jun 24, 2019
@doingandlearning
Copy link
Author

Thanks @stephenwf - that's definitely what the problem is. I've just double checked the source of the item and see the label has a @value and a @language attribute.

Unfortunately, the solution of enabling the i18n module hasn't fixed it. I notice this is also an issue on the collection view page
image

Here the label is just replaced with the word Array below each canvas.

I'll keep poking away at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working i18n Internationalisation
Projects
None yet
Development

No branches or pull requests

2 participants