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

Unable to unset metadata layer for Timeseries layer #260

Closed
jampukka opened this issue Dec 9, 2021 · 3 comments
Closed

Unable to unset metadata layer for Timeseries layer #260

jampukka opened this issue Dec 9, 2021 · 3 comments

Comments

@jampukka
Copy link
Member

jampukka commented Dec 9, 2021

When using the "Date and Range" Time series UI option in Visualization tab for a Timeseries layer the admin user can't properly unselect the metadata layer. The ------- option doesn't actually clear the selected layer, instead it still gets POSTed as

"options": {
  "timeseries": {
    "metadata": {
      "layer": ""
    },
    "ui": "range"
  }
}

Changing to Player/animation doesn't clear the metadata element from options either.

This causes an issue with oskari-server causing it to fail when trying to delete ANY layer from the instance from the following chain:
https://github.com/oskariorg/oskari-server/blob/2.5.1/control-admin/src/main/java/fi/nls/oskari/control/admin/LayerAdminHandler.java#L131
https://github.com/oskariorg/oskari-server/blob/2.5.1/control-admin/src/main/java/fi/nls/oskari/control/admin/LayerAdminHandler.java#L150
https://github.com/oskariorg/oskari-server/blob/2.5.1/control-admin/src/main/java/fi/nls/oskari/control/admin/LayerAdminHelper.java#L28

Current workaround is to temporarily select any layer as the metadata layer and then deleting and re-adding the timeseries WMS layer to remove the invalid metadata element.

@jampukka
Copy link
Member Author

jampukka commented Dec 9, 2021

I will contribute a fix to LayerAdminHelper but proper fix would also include possibility to properly unset the metadata field via UI.

@ZakarFin
Copy link
Member

ZakarFin commented Dec 9, 2021

Thanks for reporting this and offering a fix for the server side as well!

@ZakarFin
Copy link
Member

Merged oskariorg/oskari-frontend#1715 for 2.6 release to prevent frontend admin-functionality from generating unnecessary configuration for timeseries layers when admin toggles through the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants