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

Removed WMS searchable layer can lead to app crash #1206

Closed
jacobwod opened this issue Oct 6, 2022 · 0 comments
Closed

Removed WMS searchable layer can lead to app crash #1206

jacobwod opened this issue Oct 6, 2022 · 0 comments
Assignees
Labels
bug module:admin plugin:search Functionality and features of the (core) Search plugin
Milestone

Comments

@jacobwod
Copy link
Member

jacobwod commented Oct 6, 2022

Describe the bug
The Search tool allows us to configure WMS layers as searchable (using the corresponding WFS endpoint).

There is a problem that can occur if such a WMS layer is removed from layers definition but not removed from Search tool prior to the change. The issue is that the layer will not be visible in Admin anymore (hence not removable), but its ID will still exist in the selectedSources array, which can lead to this:
Skärmavbild 2022-10-06 kl  09 47 08

Proposed solution
As Admin is not capable of removing the erroneous entry, we have to handle it differently. I'll take care of Client, so it won't crash. In addition, I'll print a log message in console that tells admins to take a look into their configs and (manually) remove references to the missing layer.

@jacobwod jacobwod added bug module:admin plugin:search Functionality and features of the (core) Search plugin labels Oct 6, 2022
@jacobwod jacobwod added this to the 3.11 milestone Oct 6, 2022
@jacobwod jacobwod self-assigned this Oct 6, 2022
jacobwod added a commit that referenced this issue Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug module:admin plugin:search Functionality and features of the (core) Search plugin
Projects
None yet
Development

No branches or pull requests

1 participant