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

Resource Template facet doesn't work #51

Open
yangli0516 opened this issue Nov 22, 2024 · 4 comments
Open

Resource Template facet doesn't work #51

yangli0516 opened this issue Nov 22, 2024 · 4 comments

Comments

@yangli0516
Copy link

All other types of facets (value, resource class etc.) work great while the resource template facet is broken. When applying the resource template value in the faceted browse site page, nothing happens, and it always show the full result set.

image

@jimsafley
Copy link
Contributor

I can't reproduce this. The resource template facet works as expected.

Open your browser's web development tools. Are you getting a JS error in the console? When clicking of a template facet, what's the URL of the resulting fetch request? Go to the item advanced search page and see if filtering by template there results in the same behavior.

@yangli0516
Copy link
Author

yangli0516 commented Nov 23, 2024

@jimsafley there's no JS error in the console. The URL fetching the request when I clicked on "Newspaper" was

http://omaa-omeka.laragon.local/s/omaa/faceted-browse/1/browse?resource_template_id%5B%5D=2&resource_template_id%5B%5D=3&resource_template_id%5B%5D=4&resource_template_id[]=3&faceted_browse_category_id=1

Is this caused by setting the search query based on resource templates to the category?

image

@yangli0516
Copy link
Author

yangli0516 commented Nov 23, 2024

I have tested removing the search query from the category. Now the resource template facets are working. From my understanding, the search query in a category sets the whole result set for the search, which shouldn't affect the behavior of facets. Is this a bug?

@jimsafley
Copy link
Contributor

Yes, this is a bug caused by merging the category query with the facets query, which, as you discovered, can conflict with each other. I'm working on a fix that avoids the merge altogether.

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

No branches or pull requests

2 participants