AtlasOfLivingAustralia / biocache-hubs

Biocache Hub UI grails plugin
Other
3 stars 30 forks source link

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

Open kylie-m opened 1 month ago

kylie-m commented 1 month ago

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 commented 1 month ago

Raised via user support

Current workaround is to follow the link to Biocache:

nickdos commented 1 month ago

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 commented 1 month ago

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.

kylie-m commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

kylie-m commented 1 month ago

@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 commented 1 month ago

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 commented 1 month ago

@qifeng-bai has code reviewed this change

kylie-m commented 3 weeks ago

User support ref: https://support.ehelp.edu.au/a/tickets/209039 https://support.ehelp.edu.au/a/tickets/209360 https://support.ehelp.edu.au/a/tickets/209512 https://support.ehelp.edu.au/a/tickets/209610 https://support.ehelp.edu.au/a/tickets/210210