Skip to content

Distinct queries cause GeoMap plugin to 404 upon pin click #7685

@nfshoobs

Description

@nfshoobs

Describe the bug
In queries in Specify 7.11.3 (and other recent versions) when Distinct is TRUE, the columnIndex values in localityMappings (in ToMap.tsx) point to wrong positions due to the difference in the number of fields.
This causes the GeoMap plugin to throw a 404 error whenever a pin is clicked in distinct queries other than those where locality is the base table. This issue does not appear to occur in queries where Distinct is FALSE. I initially thought the problem was related to base tables, but further testing reveals I was mistaken and that the behavior is actually related to whether Distinct is checked/unchecked. See initial report of the error on the Speciforum here.

To Reproduce
Steps to reproduce the behavior:

  1. Query any base table (other than locality) with lat1 and long1 fields mapped and Distinct set to TRUE
  2. Click GeoMap Plugin button
  3. Click on a pin
  4. Observe 404 error.

Expected behavior
All queries should behave the same way when the GeoMap Plugin is used, and clicking a pin in GeoMap should bring up the related record information via API call to the locality table.

Please fill out the following information manually:

  • OS: MacOS Tahoe 26.2 (25C56) (have reproduced in Windows, unsure of version)
  • Browser: Chrome, Firefox, Safari
  • Specify 7 Version: 7.11.3 (and earlier)
  • Database Name: OSU invertebrates
  • Collection name: All
  • User Name: SpAdmin
  • URL: https://invertebrates.osu.edu/specify/query/168/

Reported By
Nate Shoobs, OSU Division of Invertebrate Zoology

Additional context
Should be reproducible in any DB, it's an endemic problem to the way ToMap.tsx interacts with distinct queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions