Bug report #12146

Join tables are not shown in form defined by Drag and drop designer

Added by Seb Radzimski almost 10 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Forms
Affected QGIS version:2.6.0 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:20340

Description

Hi there!
I found a problem in QGIS 2.6.1 while working with joined layers and showing them in forms definded in 'drag and drop designer'. In an attached project I joined 2 layers ('two' is joined into 'one'). Using 'drag and drop designer' I defined simple form to display layers attributes. The problem is that I don't see any attributes of layer 'two' when selecting layer 'one' feature in that form. If I change editor to 'autogenereted' I see all attributes as in table manager. But when I defined that form (in 'drag and drop') everything was working fine...until I reload the project.
I hope you understand what I mean but please check attached project. If you open it and select any line on a layer 'one' you wond be able to see any attributes of joined layer 'two' while using drag and drop form. But in attribute table everything will be fine as when you change editor for autogenerate.
Please let me know if that is a bug or I am doing something wrong.
Cheers!

test.zip (11.4 KB) Seb Radzimski, 2015-02-07 03:52 AM

jojn_form.png (229 KB) Giovanni Manghi, 2015-02-09 12:28 AM

01.png (99.4 KB) Seb Radzimski, 2015-02-12 02:13 PM

02.png (92.3 KB) Seb Radzimski, 2015-02-12 02:13 PM

01.png (38.8 KB) Seb Radzimski, 2015-02-18 02:50 AM

02.png (48 KB) Seb Radzimski, 2015-02-18 02:50 AM

03.png (82.2 KB) Seb Radzimski, 2015-02-18 02:50 AM

04.png (80.9 KB) Seb Radzimski, 2015-02-18 02:50 AM

00.png (32.7 KB) Seb Radzimski, 2015-02-18 02:50 AM

22.png (87 KB) Seb Radzimski, 2015-02-22 09:08 AM

Associated revisions

Revision d8b715ab
Added by Jürgen Fischer over 9 years ago

attribute form: lookup attribute fields by name. joined layers might be unavailable at load time (fixes #12146)

Revision 61555f59
Added by Jürgen Fischer over 9 years ago

attribute form: lookup attribute fields by name. joined layers might be unavailable at load time (fixes #12146)

History

#1 Updated by Giovanni Manghi almost 10 years ago

it seems to work on master, see attached image. Can you test and report back? thanks.

#2 Updated by Seb Radzimski almost 10 years ago

Thanks Giovanni! I found this problem on Windows 7 and 8 but I will check that on Ubuntu as well. Please have a look on my attached images (01.png that is the same project). Attributes of joined table are shown in 'Attribute table' but not shown in 'two' tab, in a form made by 'Drag and drop'. Well, when you are joining tables you can see everything, but after saving and reloading the project, columns of that joined table disappeared from tab 'two'. In my bigger project I join two postgresql tables with many columns. In a similar tab you can see that there is many columns (there is a side bar on 02.png image) but there is no attributes. If I re-define that join (in layer properties) everything will be OK, but after saving and reloading the project, columns from joined table disappears. I checked that sytuation on many Windows computers (stand alone instalation or OSGeo4W) and it happens everywhere.
I hope you will be able to confirm that bug :)
Cheers!

#3 Updated by Giovanni Manghi almost 10 years ago

Seb Radzimski wrote:

Thanks Giovanni! I found this problem on Windows 7 and 8 but I will check that on Ubuntu as well. Please have a look on my attached images (01.png that is the same project). Attributes of joined table are shown in 'Attribute table' but not shown in 'two' tab, in a form made by 'Drag and drop'. Well, when you are joining tables you can see everything, but after saving and reloading the project, columns of that joined table disappeared from tab 'two'. In my bigger project I join two postgresql tables with many columns. In a similar tab you can see that there is many columns (there is a side bar on 02.png image) but there is no attributes. If I re-define that join (in layer properties) everything will be OK, but after saving and reloading the project, columns from joined table disappears. I checked that sytuation on many Windows computers (stand alone instalation or OSGeo4W) and it happens everywhere.
I hope you will be able to confirm that bug :)
Cheers!

please test qgis master.

#4 Updated by Seb Radzimski almost 10 years ago

I have checked it on QGIS 2.7.0-100 master (OSGeo4W) or on Ubuntu 12.04 and I have the same problem.
For two layers (one.shp and two.shp) I create a join in one.shp (file properties) like on pic 01. Then I create in Drop and Drop editor a form as on pic 02. And everything works fine (pic 03) until I save the project and reload it. Then I don't see any attributes in of joined table (pic 04). I have to open layer one.shp properties and click in Fields menu on tables, click OK and it works again! I know that is a strange thing but it happens on many computers (Windows/Ubuntu) with QGIS 2.6.1 or 2.7 master. For me it looks like some options are missing in qgs file, so after reloading project, QGIS doesn't know how to display attributes of joined tables in forms made in Drag and Drop editor. Please check it for me, if after saving and reloading project you have the same problem.

#5 Updated by Jürgen Fischer almost 10 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed/implemented

should be fixed in 39d3765

#6 Updated by Seb Radzimski over 9 years ago

Well, I have checked it again on QGIS 2.8 and 2.9.0 master and I still get the same bug. I don't know if there is something wrong in all my computers or maybe I'm doing something wrong, but I found in this kind of sytuation QGIS 2.2 says "Error: Field doesn not exist in database" (pic 22). Of course that is happen after saving and reloading poroject. And like before, it is enought to open layer properties and click on field menu to make everything working fine.
Regards!

#7 Updated by Artur Lill almost 9 years ago

  • Assignee set to Jürgen Fischer

I confirm that this bug is Not Fixed Yet:
1. Attribute editor layout is set to Drag and Drop designer.
2. I added joined table attribute named ATR1 into form.
3. Using tool "Identify Features" now I see also this added attribute ATR1 on form.

After saving and reloading project and repeating just step 3
attribute ATR1 is not seen on form anymore.

#8 Updated by Giovanni Manghi almost 9 years ago

  • Status changed from Closed to Reopened
  • Resolution deleted (fixed/implemented)
  • Assignee deleted (Jürgen Fischer)
  • Target version deleted (Version 2.8)

#9 Updated by Artur Lill almost 9 years ago

Just tested with QGIS 2.12.2 and it looks much better now:
now attributes are shown on form but labels are missing.

#10 Updated by Nyall Dawson over 8 years ago

  • Status changed from Reopened to Closed
  • Resolution set to fixed/implemented

Not reproducable on current master

Also available in: Atom PDF