As soon as I save a view where i added a flag action field this error appears

Fatal error: Call to a member function get_views_info() on a non-object in .../public_html/things/sites/all/modules/flag/includes/flag_handler_field_ops.inc on line 45

Drupal 6.4
Views 6.x-2.0-rc3
6.x-1.x-dev - Sept 23

Comments

mooffie’s picture

Go to the "Flags: Flag link" field settings and click "Update". This will probably solve your problem. Please let me know. If it doesn't solve your problem, please "export" your view and paste it here.

The longer answer:

There's a glitch in Views. A "Relationship" dropdown is shown for fields/filters/etc., but unless you click "Update", this setting doesn't "catch". I'll probably file an issue against Views.

dodorama’s picture

Status: Active » Closed (fixed)

Thanks. It worked !

mooffie’s picture

Status: Closed (fixed) » Active

I'll leave it open till I tend to it.

mooffie’s picture

And thanks for the report, Paolo.

mooffie’s picture

Here's the Views issue I've just opened:

#313377: Relationship wrong when skipping "Update" button

mooffie’s picture

Status: Active » Fixed

Good news: this has just been fixed in Views. I'm closing this.

dodorama’s picture

You guys are FAST!
Thanks, again

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

JCB’s picture

Component: Code » Flag core

Hi Guys,

I had the same problem with views; however the solutions you gave did not solve the problem.
Not to worry; I got it working.

I realized that I changed the bookmarks flag's "Name" located here:
admin/build/flags/edit/bookmarks

In the views there is a relationship which links to this name.

This is not the best way of connecting flag with views; but it is working.

Hope this helped someone.

JCB

Gabriel R.’s picture

Title: Fatal error when adding fields on a view » Fatal error when adding fields on a view (with workarounds)

I just had this problem too, and we found a different cause:

1. Create a Views display and choose to override the Relationship.
2. Add a Flag relationship.
3. Add Fields and Filters using the relationship. Note that change the default display.

RESULT: Errors in displays using the default Relationships missing the extra Flag.