[Geoserver-devel] [JIRA] (GEOS-8660) "Reload feature type" in layer UI won't work if the FeatureTypeInfo has a saved list of attributes

Andrea Aime created an issue

GeoServer / BugGEOS-8660

“Reload feature type” in layer UI won’t work if the FeatureTypeInfo has a saved list of attributes

Issue Type:

BugBug

Assignee:

Unassigned

Components:

Wicket UI

Created:

22/Mar/18 7:38 PM

Priority:

MediumMedium

Reporter:

Andrea Aime

Believe this happens on legacy data directories (we don’t store the list of attributes anymore as far as I remember) and it disallows from seeing new attributes in the underlying storage.

This patch seems to fix it (needs a test, cannot write it right now):

diff --git a/src/web/core/src/main/java/org/geoserver/web/data/resource/FeatureResourceConfigurationPanel.java b/src/web/core/src/main/java/org/geoserver/web/data/resource/FeatureResourceConfigurationPanel.java
index 09a7674..411737e 100644
--- a/src/web/core/src/main/java/org/geoserver/web/data/resource/FeatureResourceConfigurationPanel.java
+++ b/src/web/core/src/main/java/org/geoserver/web/data/resource/FeatureResourceConfigurationPanel.java
@@ -135,6 +135,7 @@ public class FeatureResourceConfigurationPanel extends ResourceConfigurationPane
                 GeoServerApplication app = (GeoServerApplication) getApplication();
                 
                 FeatureTypeInfo ft = (FeatureTypeInfo)getResourceInfo();
+                ft.getAttributes().clear();
                 app.getCatalog().getResourcePool().clear(ft);
                 app.getCatalog().getResourcePool().clear(ft.getStore());
                 target.add(attributePanel);

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100082-sha1:91c8a36)

Atlassian logo