Skip to content

Identify: It sometimes select an empty option in the layer selector #12666

Closed

Description

@Gaelle-CGI

Description

On the plugin Identify, the list of layers can select an empty element, while there are valids elements to select.

Image Image

How to reproduce

  • Go on a map with at least two layers (like this demo one: 1 - Demo Map)
  • Click on a layer
  • Click somewhere there isn't the first layer you clicked one, and with at least another one

Demo

bug_identify.mp4

Expected Result

The component to select layer doesn't end up on an empty choice. In this case it could for example pick the first valid one.

Current Result

The layer selector can end up on a layer with no result, which render as an empty choice because it has "display : none".

Image
  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome
Firefox
Safari

Other useful information

The selected layer is defined by the attribute "index" in the reducer "mapInfo".

Security vulnerabilities

Do not report security vulnerabilities in public issues.

If you believe you have found a vulnerability in MapStore, please use GitHub private vulnerability reporting or contact the security address listed in SECURITY.md.

Activity

  1. tdipisa commented on Jul 16, 2026

    @tdipisa
    Member

    @Gaelle-CGI thank you for reporting. I'm not able to reproduce at the moment. Probably this issue is not always reproducible for some reason.

    Image

    A quick check on that would be definitely a good thing to do.

  2. Binabh commented on Jul 23, 2026

    @Binabh
    Contributor

    @tdipisa I could reproduce this in current master.

    Image Image

    The probable cause for this maybe due to how valid responses from getFeatureInfo request is stored for each layer. GetMapInfo responses are asynchronous by nature and problem is happening because invalid response is not properly replaced by valid responses.

    Root Cause

    • GetMapInfo Responses arrive asynchronously and are inserted by request position.
    • The reducer only repairs an invalid retained index when the previous state already has loaded: true
    • When the final response arrives, that reducer makes loaded: true, but checks state.loaded, which is still false. With no later response, the invalid index is never corrected

    Possible fix

    • Need to properly handle replacement of invalid state when valid data is received
  3. added this to the 2026.02.01 milestone on Jul 24, 2026
  4. added theissue type on Jul 27, 2026
  5. added a commit that references this issue on Aug 7, 2026
  6. modified the milestones: 2026.02.01, 2026.03.00 on Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions