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

MapStore must not rely on the workspace prefix inside the style names returned by GetCapabilities #519

Closed
giohappy opened this issue Sep 24, 2021 · 10 comments
Assignees
Labels
3.3.x bug Something isn't working Epic

Comments

@giohappy
Copy link

Geoserver 2.19.x fixed a wrong behaviour where style names isnide workspace-specific GetCapabilities reponse were returned with the workspace prefix.
MapStores Styled editor relied on this prefix for its functionalities, which now are broken with Geoserver 2.19.x.

Another method must be designed to retrive the fully qualified name of the style (workspace + style name).

@allyoucanmap
Copy link
Collaborator

@giohappy I'm investigating client side to understand how to fix this behaviour but there are some cases where it's not possible recognize the correct workspace for example when a layer uses style from the global styles/ folder mixed with other from a specific workspace.

case

  • layer gs:us_states with get capabilities targeting its own specific workspace shows all the styles without prefix but there are some styles that are in the global styles folder. How should the client guess which one is from the styles folder and which not? (pophade, pophatch and polygon are in the global styles/ directory)

https://gs-stable.geo-solutions.it/geoserver/gs/us_states/wms?service=WMS&version=1.3.0&request=GetCapabilities

@giohappy
Copy link
Author

giohappy commented Oct 4, 2021

this is a good question. We should ask the Geoserver team.

@allyoucanmap
Copy link
Collaborator

@giohappy the answer is that we cannot rely on get capabilities to get information about the workspace of a style but we should use the geoserver rest api instead.

@giohappy
Copy link
Author

giohappy commented Oct 4, 2021

@allyoucanmap so another request to do...
Having a proper metadata management for styles is more and more urgent, but since this won't happen very soon I don't see any other solution then doind this affitional request for the time being.

@giohappy
Copy link
Author

giohappy commented Oct 5, 2021

@allyoucanmap apparently the problem also happens with the new 2.18.x, the one updated for the current GN 3.2.x. Can you please give it a look urgently?

@giohappy
Copy link
Author

giohappy commented Oct 7, 2021

For the moment we're stuck since responses from the GetCapabilities can be ambigous in case multiple styles with the same name are assigned to a layer. There's no way to tell which layer is what.

For GeoNode we could base the solution on the metadata returned by the GS REST API but we have a problem with the double requests that are currently needed to set the metadata for a new layer.

At the moment the only way to distinguish styles with same name from multiple workspaces is to do a global GetCapabilities, which is far from optimal of course.

@simboss we need to discuss an alternative solution together with the Geoserver team I guess.

@giohappy giohappy added the Epic label Oct 7, 2021
@giohappy
Copy link
Author

@allyoucanmap do you think we can port the fix to the mapstore client quickly?

@allyoucanmap
Copy link
Collaborator

@giohappy yes, starting to work on it

@giohappy
Copy link
Author

giohappy commented Nov 9, 2021

I guess this can be close @allyoucanmap right?

@allyoucanmap
Copy link
Collaborator

@giohappy yes

@giohappy giohappy closed this as completed Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.3.x bug Something isn't working Epic
Projects
None yet
Development

No branches or pull requests

2 participants