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

Explore Your Area - only listing top 50 species per group #610

Open
kylie-m opened this issue Aug 12, 2024 · 10 comments
Open

Explore Your Area - only listing top 50 species per group #610

kylie-m opened this issue Aug 12, 2024 · 10 comments
Labels
Milestone

Comments

@kylie-m
Copy link

kylie-m commented Aug 12, 2024

Explore Your Area is now only showing the top 50 species per group, except for "All species". This is happening on ALA, AVH and Ozcam explore your area tools.

Steps to replicate:

  1. Go to explore your area, search any location

  2. Click on any group (other than "All species") with more than 50 species

  3. Scroll down the list of species, verify that only 50 are showing
    Screenshot 2024-08-12 at 3 00 31 pm

  4. At the bottom of the list, click on 'Show more species'. It now displays "[no species found]":
    Screenshot 2024-08-12 at 2 58 36 pm

Other testing notes: I've tested using Chrome, Firefox, Safari and Edge, getting the same results

@kylie-m
Copy link
Author

kylie-m commented Aug 12, 2024

Raised via user support

Current workaround is to follow the link to Biocache:

  • select a group and then click "View selected records",
  • filter by species or other taxonomic groups, using the left side panel
  • view locations using the Map tab.

@nickdos
Copy link
Contributor

nickdos commented Aug 12, 2024

JS errors in console - looks like its trying to reference the content of a dom element that no longer exists on page:

TypeError: Cannot read properties of undefined (reading 'split')
at HTMLTableRowElement. (exploreYourArea.unminified.js:3093:26)

 $('#rightList tbody tr').bind('click.specieslink', function(e) {
        e.preventDefault(); // ignore the href text - used for data
        var thisTaxonA = $(this).find('a.taxonBrowse2').attr('href').split('/');

EDIT: that is triggered when you click the link at the bottom of the list Show more species - does not account for the automatic loading of the list, which should happen when the user scrolls to the end of the list. There are no errors in this scenario, which suggests the event is not being triggered.

@nickdos
Copy link
Contributor

nickdos commented Aug 13, 2024

Latest code works fine on local dev setup and I noticed that prod is using an old version of biocache-hubs, suggesting this is the cause.

NVM, didn't read details above properly and missed the bit about (other than "All species").

Found the bug and fixed the group names with square braces around them as well.

nickdos added a commit that referenced this issue Aug 14, 2024
Also fixed species group labels showing square braces around them - i18n tool adds this when there is a missing translation entry. @vjrj - might need to add to LA i18n files.
@kylie-m
Copy link
Author

kylie-m commented Aug 15, 2024

Hi @nickdos FYI it's also just been flagged by a second user that sorting by name/number is failing.

I've replicated this on ALA, AVH and Ozcam by:

  1. Click on "Common name" to sort by it. Result = [no species found]
  2. Same for "Scientific names" and
  3. Same for "Records"

@nickdos
Copy link
Contributor

nickdos commented Aug 15, 2024

Thanks @kylie-m, I did pick that up and fixed it as well. The code for both was in the same block and used the essentially the same logic. Both are fixed and I'll deploy to test later today.

@nickdos
Copy link
Contributor

nickdos commented Aug 15, 2024

@kylie-m - would you mind testing my fix that is deployed to test, please?

@kylie-m
Copy link
Author

kylie-m commented Aug 15, 2024

@nickdos working well for me on ALA EYA, I tested the fixed issues plus general test cases on # 6 of Biocache hubs testing docs. All passing - thanks again for this!

Just noting AVH and Ozcam EYA's are still failing on test but I assumed the fix wasn't deployed there

@nickdos
Copy link
Contributor

nickdos commented Aug 15, 2024

Just noting AVH and Ozcam EYA's are still failing on test but I assumed the fix wasn't deployed there

@kylie-m - yes, I did not deploy those hubs yet. I just wanted to check this issue and those 2 hubs are not officially supported for "explore your area" - that page exists but is not linked to/from anywhere on those site. So its a ghost page for them.

@nickdos
Copy link
Contributor

nickdos commented Aug 15, 2024

@qifeng-bai has code reviewed this change

@nickdos nickdos added the bug label Aug 15, 2024
@nickdos nickdos added this to the 7.1.1 milestone Aug 16, 2024
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

2 participants