Skip to content

Handle items without media - #28

Open
ReallyLiri wants to merge 1 commit into
Daniel-KM:masterfrom
DHHuji:master
Open

Handle items without media#28
ReallyLiri wants to merge 1 commit into
Daniel-KM:masterfrom
DHHuji:master

Conversation

@ReallyLiri

Copy link
Copy Markdown

No description provided.

@Daniel-KM

Copy link
Copy Markdown
Owner

I don't understand, the items without media are already managed (they should have an external manifest in a property). Why display the viewer without anything to show ?

@ReallyLiri

Copy link
Copy Markdown
Author

Sorry, I should've included more description.

This change prevents Universal Viewer from being rendered on item and item set pages when there is nothing displayable.

The fix in UniversalViewer.php - While the helper already had checks for empty items and empty item sets, they ran too late, after external manifest resolution had already been attempted. This meant an item with no media could still produce a viewer if some manifest-like URL path was available upstream. The change moves the displayability checks earlier in the helper flow.

This is an actual case we encountered on our Omeka and had deployed this fix on our site.

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