Bug report #8516
Postgis layer - Feature edit form is empty when feature is pasted from another layer
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Windows XP as well as Windows7||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||worksforme|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||17272|
My QGis version is 1.8.0
I can populate the_geom field of geometryless records (created by a web application
a wiki which leaves the_geom empty) in QGis by creating new feature or pasting existing feature from some existing layer, by mean of a layer connected to my postgresql database. Ther is only one other attribute : id, which is a primary key.
The id of the new feature is selected by using the option "List of values" in the attribute editor, setup with only one possible value (a qgs project with the connected layer is built by the wiki).
A rule in the posgresql table fills the geometry field of the appropriate record when feature edit form is opened, without problems of primary key duplication.
It works fine with created features, the edit form pops up and shows the unique value in a dropdown list. The automatically supplied value is used by the postgresql update rule.
The problem comes from the pasted features, because their attribute editor windows appears empty. Their id field cannot be defined and the layer cannot be saved.
Is there something to do, some kind of update, to open the right edit form ? Or is it a bug ?
If I try to close the layer, an error message from postgresql appear and layer remains opened. A second call to feature edit form is then correct, le list of value and id attribute appear normally (!!!?).
Thank you very much if this can be fixed (It works anyway but I need to go through the error step when a feature is pasted...). Please tell if I wasn't clear enough...
#5 Updated by Yves NEDELEC over 7 years ago
I'll try again at my office but I installed tonight at home the version 1.9.0 weekly (n°33 I think it was).
With the same test layers, I opened an appropriate edit form window from a pasted feature, so the problem seems to have been fixed between these versions... Thank you for the good advice.