Metadata Browse Error: See all media with this value

I’m working on an issue that one of our users reported with the Metadata Browse module. The user has selected several types of metadata to be browesable, and they have also selected under Site setting → Attachment link type => Media page because they liked the look of the media show pages better. As a result, they have extensively described the media, because that is the page that they are linking to.

However, there is a bug in the way that MetadataBrowse builds search parameters for media (i.e. the link that says “see all <resource_type> with this value”).

I believe it is because MedatadaBrowse is making some unsafe assumptions about the actions/views that are available on the public facing site, and so it is building the search using the pattern /s/site-slug/<controller_name><search_parameters>. However, because there isn’t an action in Site/MediaController to handle this (e.g. browseAction()) the controller cant dispatch the request.

I’m looking for some advice on how to best go about patching this. I think the ideal solution would be to add a browse action and corresponding view to the Site/MediaController in parity with the Admin/MediaController and the Item and Itemset site controllers.

Yeah, there’s no way for MetadataBrowse to do what it does without there being a Media browse action, which as you correctly note, there isn’t.

The near-term correct fix for MetadataBrowse would be to not have it operate on Media on the public side.

Thanks, John. That is more-or-less what I told the user (disable the feature for now). For the long-term solution, is it more reasonable to fix this just within the module, or would you be willing to entertain a pr for Omeka S that implemented the action in the Site/MediaController that would make this feature work?

I’ve made the change to the module to stop it generating these non-working links in the immediate term (I believe you filed the issue there also).

As for implementing the action (and then being able to re-enable the module for Media once that’s done), it’s something we’re willing to entertain, sure. It has to be set up in such a way that only the media actually belonging to the site are being browsed, but that should be pretty simple. There are also just some other bits that come along with it once you’re going down that road, the advanced search for media, including an option for them to be linked into the navigation, etc.

Sounds good. I’ll put it on my calendar.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.