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

Issues with thumbnails on public catalog search results list #1891

Open
laritakr opened this issue Jan 17, 2023 · 0 comments
Open

Issues with thumbnails on public catalog search results list #1891

laritakr opened this issue Jan 17, 2023 · 0 comments
Labels

Comments

@laritakr
Copy link
Collaborator

laritakr commented Jan 17, 2023

Descriptive summary

Public catalog search results page does not show appropriate thumbnails for collections. Collection thumbnail method references only default thumbnails.

The following code works in an individual tenant but has not been tested in a shared tenant's search results.

    # Used by public index views (standard & gallery)
    def collection_thumbnail(document, _image_options = {}, _url_options = {})
      return image_tag(document.thumbnail_path) unless document.thumbnail_id
      return super if Site.instance.default_collection_image.blank?

      image_tag(Site.instance.default_collection_image&.url)
    end

Rationale

Overriding some partials and behavior to generate urls for shared search resulted in a few incorrect behaviors which need to be fixed for collections.

Expected behavior

Public view of catalog search results should show all object thumbnails when they exist, and site-defined defaults when they do not.

Actual behavior

Collections show only Site (if available) or Hyrax (fallback) default thumbnail. It ignores the collection's assigned thumbnail.

Steps to reproduce the behavior

  1. Create a collection with an uploaded thumbnail.
  2. Uploaded thumbnail does not show on public catalog search results views.

Testing notes

  1. Verify that everything works on individual tenants as well as a shared search tenant.
  2. Verify that index, gallery, masonry, and slideshow views all work.
  3. Verify that Site-specific default thumbnail works if one is assigned.
@laritakr laritakr added the bug label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant