Problem in geoserver: Layer definition page for SQL view layer is inaccessible if the query is invalid

Hello, I am not able to open a topic in the geoserver forum, I guess becauase I am a new user. But I wanted to report this bug to the community anyway.

I have discovered a problem with the SQL View layer page. It seems that if the PostGIS database associated with the layer changes its structure in such a way that a table no longer exists, or is otherwise invalid, the page fails to load:

I believe this has something to do with the page trying to introspect the data source, finding out that certain things are invalid, and crashing. This is quite annoying, since you may make changes in the database and then would prefer to just go and modify the SQL View afterwards. The only way to fix it, it seems, is to delete the layer and re-create it from scratch.

I think that is should be handled a bit more elegantly than this, for example indicating that problematic properties or settings on the layer are invalid, so that they can be repaired directly on the UI.

Please open a bug report in the issue tracker (if one does not already exist) as described in Issue tracker - GeoServer

Did you try GeoServer/user ? The top-level “GeoServer” category does not
accept new messages.

Maybe it is the same problem ?
I have a MySQL archive from which I created a view of points with the following values:

Property Type Nillable Min/Max Occurrences
tipo Integer false 1/1
longitudine String true 0/1
latitudine String true 0/1
datoLoc Geometry true 0/1
descrizione String true 0/1
titoloDato String true 0/1

I can see them on Google Earth using a network link like this:

ruby

Copia codice

http://servername/geoserver/TestArea/wfs?request=GetFeature&version=1.0.0&typeName=TestArea:Test&outputFormat=application/vnd.google-earth.kml+xml&format_options=KMPLACEMARKNAME:titoloDato;SUPEROVERLAY:true;KMPLACEMARK:true

But I can’t change the visualization in any way.

I tried adding format_options=KMPLACEMARKNAME:titoloDato;SUPEROVERLAY:true;KMPLACEMARK:true, but the title does not appear.
I also tried using an SLD style file, but with no effect.

Can anyone help me?

Another strange thing is that when I check with layer preview (OpenLayers) or download the KML from the preview, I get different errors, but in Google Earth, it displays correctly and the resulting KML is correct.
All the data is filtered and contains correct coordinates.
I can’t figure out where the problem is.