[Qgis-user] Update WFS layer field type

Richard Duivenvoorde rdmailings at duif.net
Thu Feb 10 00:19:09 PST 2022


On 2/10/22 09:12, emmexx wrote:
> On 2/9/22 1:34 PM, emmexx wrote:
>> In geoserver the field type is displayed correctly but in qgis it isn't,
>> in layer properties - fields the field type is still the old one (int
>> instead of string). I didn't find a way to edit it.
> 
> Same problem if I add a new field to the postgis table.
> I can update the fields definitions in geoserver, I can see that the
> attributes of the table are updated when I send a
> WFS_describeFeatureType request to geoserver but qgis doesn't update the
> field list and the field type.
> 
> I tried to remove the WFS connection in Browser, I cleared the cache in
> Settings - Options - Network but the field list doesn't change.
> 
> Is this a bug?

Can you confirm (F12 in QGIS, seeing the requests), that QGIS is requesting WFS_describeFeatureType?
In development table, you can also see if it pulls it fresh from the net, OR if it is using a cached version.

Some other things to try:
- empty your network cache (via setting/network) (or create a new profile so you will have another dir as cache?)
- replay the WFS_describeFeatureType in a browser and make sure Geoserver is showing the right types in it

Is it a public WFS, if so can you share the URL?

Regards,

Richard Duivenvoorde




More information about the Qgis-user mailing list