The GUI doesn't allow Saving existing SQL View after edits

Description

Saving edits to an existing SQL VIew is not trowing and error, but not taking effect either. Clicking save and imediately editing again shows changes. Going back to Layers and reloading confirms that changes are not saved.

I was trying to edit parameter types and validation rules. Had to delete layer and create new layer.

Environment

Windows Server 2012 R2
Tomcat 8.5.4
JRE 8.102
Postgres 9.5.3
PostGIS 2.2.2
PostGIS (JNDI) Data Source

Activity

Show:
Jukka Rahkonen
September 20, 2017, 12:32 PM
Edited

I made a test with Geoserver 2.11 and it seems that user needs to save twice. First time after editing the SQL on page "Edit SQL view" but that is not enough. After pressing that Save button user gets back to Edit Layer page and now they need to understand to press the Save button on this page as well.

It is understandable that user believes that it is enough to save only the SQL page if they do not make any edits to the main Edit layer page especially because user does not get any hint about unsaved/ineffective edits. The need to double save is not mentioned in the documentation either http://docs.geoserver.org/stable/en/user/data/database/sqlview.html.

Andrea Aime
September 29, 2017, 5:27 PM

The sql view is part of the layer definitions so.. unless the layer is saved, the changes to the sql view are not, either.
Maybe we can improve the docs?

Andrea Aime
October 27, 2017, 5:24 PM

Added a warning in the documentation, that saving the sql view definition is not sufficient, the layer containing it must be saved too.

Fixed

Assignee

Andrea Aime

Reporter

Derek Watling

Triage

Fix versions

None

Affects versions

Priority

Medium
Configure