Bug report #12113

Actions launched from attributes table does not work if field has a "hidden" widget.

Added by Julien Perrot almost 10 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Attribute table
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:20307

Description

Hello everybody,

A little bug existing since some version of QGIS (since 2.2 at least) :

When a custom action created from the configuration menu of a layer is defined, and use an attribut, the action works weel when using the geographic interface (choosing "action tool" and clicking on the geographical entity on the map). But when opening attributes table, clicking right on a line, and choose my custom action, it is like every attribute used is empty.

Sample :

My action call :
load(QUrl('http://blablabla/test.edit.php?id=[% "gid" %]'));

In the map case :
"http://blablabla/test.edit.php?id=145" is loaded in my browser

In the attributes table case :
"http://blablabla/test.edit.php?id=" is loaded in my browser (and doesn't work, obviously)

History

#1 Updated by Denis Rouzaud almost 10 years ago

  • Assignee set to Matthias Kuhn

#2 Updated by Denis Rouzaud almost 10 years ago

  • Priority changed from Normal to High

#3 Updated by Giovanni Manghi almost 10 years ago

  • Status changed from Open to Feedback

I cannot confirm after having tested on QGIS master on both linux and windows. Please give it a try and report back.

#4 Updated by Julien Perrot almost 10 years ago

OK, I manage to point the exact problem :
The field "gid" I want to use is setted as "Hidden" in the fields properties tab. It's only in that case that the problem occured.

So I know how to avoid the problem (by changing the field type), but according to me, the feature has to work the same on both cases (map and attributes table).

Thanks for your work !

#5 Updated by Giovanni Manghi almost 10 years ago

  • Status changed from Feedback to Open
  • Subject changed from Custom actions launched from attributes table can't use attributes to Actions launched from attributes table does not work if field has a "hidden" widget.
  • Assignee deleted (Matthias Kuhn)
  • Affected QGIS version changed from 2.6.1 to master
  • Operating System deleted (Windows 7)
  • Priority changed from High to Normal

Julien Perrot wrote:

OK, I manage to point the exact problem :
The field "gid" I want to use is setted as "Hidden" in the fields properties tab. It's only in that case that the problem occured.

So I know how to avoid the problem (by changing the field type), but according to me, the feature has to work the same on both cases (map and attributes table).

Thanks for your work !

it used to work as expected in past qgis releases?

#6 Updated by Giovanni Manghi over 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#7 Updated by Giovanni Manghi almost 6 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF