Bug report #8516

Postgis layer - Feature edit form is empty when feature is pasted from another layer

Added by Yves NEDELEC almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Data Provider/PostGIS
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

Description

Hi,
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...
Best regards,
Yves

pasted_point_with_empty_form.jpg - The point was pasted fro a shp. It has no attribute named id. (181 KB) Yves NEDELEC, 2013-08-25 10:38 AM

created_feature_with_correct_editor.png (326 KB) Yves NEDELEC, 2013-08-25 10:45 AM

History

#1 Updated by Giovanni Manghi almost 7 years ago

  • Status changed from Open to Feedback

Hi,

*) have you tested qgis master?

*) as the description is not very clear, can you supply a list of detailed steps on how to replicate the issue?

#2 Updated by Yves NEDELEC almost 7 years ago

I send another view with a right editor window on a created point

#3 Updated by Yves NEDELEC almost 7 years ago

Thank you for you quick answer...I'll write a full list of steps.
Yves

#4 Updated by Yves NEDELEC almost 7 years ago

... as soon as possible, I just can't do it right now.
Thanks again.
Yves

#5 Updated by Yves NEDELEC almost 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.
Best regards,
Yves

#6 Updated by Giovanni Manghi almost 7 years ago

  • Resolution set to worksforme
  • Status changed from Feedback to Closed

Yves NEDELEC wrote:

the problem seems to have been fixed between these versions...

please reopen if necessary.

Also available in: Atom PDF