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

Including institution name with ampersand in Biocache search causes error when sorting #626

Open
timhicks-ala opened this issue Jan 10, 2025 · 1 comment
Assignees
Milestone

Comments

@timhicks-ala
Copy link

To reproduce, open this link and then change the number of items per page, sorting, or order (ascending/descending): https://biocache.ala.org.au/occurrences/search?q=lsid%3Ahttps%3A%2F%2Fid.biodiversity.org.au%2Ftaxon%2Fapni%2F51293610&qualityProfile=ALA&fq=institution_name%3A%22The%20Royal%20Botanic%20Gardens%20%26%20Domain%20Trust%22&qc=-_nest_parent_%3A*&fq=occurrence_decade_i%3A%221770%22#tab_recordsView

To get to a URL that will replicate this issue:

  • Do a search for plants
  • Click "Choose more..." under Institution
  • Click "The Royal Botanic Gardens & Domain Trust", or tick it and others and click "INCLUDE selected items"

This will create an fq parameter in the URL that performs a text search for institution names. This differs from a "Choose more..." operation on eg. data resources, because that adds a parameter that searches for DRs by ID, not by name.

The issue is that the ampersand character in "The Royal Botanic Gardens & Domain Trust" will cause an error when you change the sorting or order of a search.

This could be fixed by changing the "Choose more..." option in Biocache to use a institution UID search instead of a text search for institution names.

adam-collins pushed a commit that referenced this issue Feb 16, 2025
@adam-collins adam-collins self-assigned this Feb 16, 2025
@adam-collins adam-collins added this to the 7.1.3 milestone Feb 16, 2025
adam-collins added a commit that referenced this issue Feb 17, 2025
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