avalonmediasystem / avalon

Avalon Media System – Samvera Application
http://www.avalonmediasystem.org/
Apache License 2.0
94 stars 51 forks source link

Make override explicit by doing it in the original module in an initializer #6125

Closed cjcolvar closed 1 week ago

cjcolvar commented 1 week ago

Resolves #6124

Before this change the overridden helper method was not loading correctly and Blacklight's original implementation was executing causing the return value to be a SolrDocument which led to incorrect urls in the search results. This is probably due to a change in the way zeitwerk autoloading works in Rails 7.2 and only manifests in production environment. It doesn't appear in the development environment because of a reloading workaround that targets the development environment (see https://github.com/avalonmediasystem/avalon/pull/1747). This workaround also fixes the issue in production but it the change in this PR feels like a better solution for this specific problem as well as being more limited in scope.