You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reproduce (tested on an islandora-playbook box):
Place the OpenSeadragon block in the content region, configure the manifest url to be node/[node:nid]/manifest or whatever pattern doesn't really matter.
Create a repository item (model can be anything).
View the object.
Note that the OSD block always renders regardless of model (design choice perhaps, doesn't really matter if using context / some other mechanisms).
Open the developer tools console of your browser's choice and see (for reference this is the JS blowing up):
This is due to the explict inclusion of the libraries in the template itself as opposed to the preprocess function. That is, the preprocess is what attaches the settings that the OSD JS requires to be present in order to instantiate itself. When there is no tile sources present (no media, no children in the paged content case) this will always blow up.
The formatter also does the same thing so could move things to the preprocess there as well.
Proposed resolution:
Remove the attach_library calls from the templates and move to the template_preprocess hooks.
This shouldn't necessarily cause any issues if someone had overridden a template already in a custom theme as worst case scenario the libraries would be "attached" twice which Drupal would de-dupe.
PR to come.
The text was updated successfully, but these errors were encountered:
To reproduce (tested on an
islandora-playbook
box):node/[node:nid]/manifest
or whatever pattern doesn't really matter.This is due to the explict inclusion of the libraries in the template itself as opposed to the preprocess function. That is, the preprocess is what attaches the
settings
that the OSD JS requires to be present in order to instantiate itself. When there is no tile sources present (no media, no children in the paged content case) this will always blow up.The formatter also does the same thing so could move things to the preprocess there as well.
Proposed resolution:
Remove the
attach_library
calls from the templates and move to thetemplate_preprocess
hooks.This shouldn't necessarily cause any issues if someone had overridden a template already in a custom theme as worst case scenario the libraries would be "attached" twice which Drupal would de-dupe.
PR to come.
The text was updated successfully, but these errors were encountered: