sld file lost when moving style from workspace to default workspace


When moving a style from a named workspace to the default (empty) workspace, the xml is copied over, but the sld is not (it is removed form the workspace directory though)...

So you loose the sld file / style

Context: for some time we had a workspace in which we also had our styles.

So when style is in workspace, both xml and sld file appear in
when you give a style a workspace in the gui

But after having some problems with workspaces and styles we do not use the workspaces anymore for the styles. And I gradually move the styles back from the named workspace (say 'foo') to the default workspace by going into the webui for a style and change the 'Workspace'-dropdown there from 'foo' to the first option, which is an empty label.
In all earlier versions this moved both xml and sld file from the workspace/styles dir to the styles dir. But now in 2.11.0 the sld file disappears.

To test:

  • be sure you have a workspace

  • create a new style aaa in this workspace

  • check that in the workspace/styles directory there is aaa.sld and aaa.xml

  • now via gui move the style from the workspace to the default workspace (the first item == emtpy line) in the Workspace dropdown

  • check the style dir: only the aaa.xml file has been moved, the sld is gone... (if you use the style in a layer this layer is now broken)

Note that I check the directories for confirmation, but the issue is about pure using gui for configuration.

In 2.10.x and earlier this has worked flawlessly.

Because this is actually deleting a style sld, I think this is a pretty severe issue?


Windows Server /Tomcat install of Geoserver 2.11.0 (dev server) and 2.10.2 (live server).


Torben Barsballe


Richard Duivenvoorde


Fix versions

Affects versions