Hi! I am getting this error after a relationship is created and you click on the relationship tab in Advance profile...

Fatal error: Call to a member function get_views_info() on a non-object in /home/cyberfan/htdocs/modules/flag/includes/flag_handler_field_ops.inc on line 66

It is killing me. Any Ideas?

Comments

AntiNSA’s picture

it happens when clicking on awaiting friends approval tab...

JFreed’s picture

Version: 6.x-1.x-dev » 5.x-1.1
AntiNSA’s picture

Version: 5.x-1.1 » 6.x-1.x-dev

I am using 6.x - why change the status?

quicksketch’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Is this problem reproduceable with just the Flag and Views module? I think it might be something caused by the Flag Friend module rather than Flag itself. If you can provide a full set of instructions on how to reproduce this problem it'll help solve it. Right now I'm not sure how to recreate the issue.

quicksketch’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Ah, actually this is a duplicate of #312450: Fatal error when adding fields on a view (with workarounds). See the explanation that Mooffie filed there.

NickWebman’s picture

Admin -> Site Building -> Flags - enable the "friends" Flag type and that error will go away.

nikhil.patil’s picture

Thanks! Saved me an hour or two!

dalegrebey’s picture

I received this error (even with the "friends" flag enabled). It happened after changing the friends view to also add a user_stats field. In this case, Navigating to Admin > Site Building > Flags and enabling friends does not work (it is already enabled). I have my database recently backed up, so am not too concerned. Will play around for a bit and see if I can find an alternate solution or a more accurate cause of the problem.

This is the error, by the way:
Fatal error: Call to a member function get_views_info() on a non-object in C:\wamp\www\sceneorlando\sites\all\modules\flag\includes\flag_handler_field_ops.inc on line 66

  • Drupal: 6.14
  • Flag: 6.x-1.1
  • Flag Friend: 6.x-1.0-rc1
  • User Stats: 6.x-1.0-rc1
Stalski’s picture

I had the error because an old view tried to load a non existing flag.

rc2020’s picture

I am also having this problem. Subscribing.

Tamanda’s picture

Version: 6.x-1.x-dev » 6.x-1.1

Hi I had the same problem too a few moments ago. Exact same error:

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

and I"m using:

drupal 6.14
facebook_status-6.x-2.0
flag-6.x-1.1
flag_friend-6.x-1.0rc

Please help.

It was working fine: I added friends, viewing friendlist etc. But I wanted to add more fields for each person's friend's list. I was making changes at the views UI page. Saved several times and went to check my friends list and found the white screen of death.

Whilst we are still trying to sort this out, could someone please please tell me how to restore the default values of the friends flag so I could use it like before without the frills I was trying to add. Please

I'm a drupal and php novice and I don't know how to hack in the code myself.

So, thanks in advance, you guys are awesome... you've helped me make a site which lots of people are raving about.... but please help me, I'm clueless (and desperate) to fix this.

Tamanda’s picture

Hi, I've since made the matter worse... (hee:by accident ofcourse). I thought ok, let me uninstal and reinstall the modules. I did it once, it didn't work...then I thought, let me do it again and clear the cache.... didn't work....

Since in some cases, some modules leave their tables in the database even after uninstallation of it that module, I thought .. let me delete the tables.... so I cross checked which tables these would be....I must have deleted one which caused the following error:

"user warning: Table 'afrocepc_drpl1.flags' doesn't exist query: SELECT f.*, fn.type FROM flags f LEFT JOIN flag_types fn ON fn.fid = f.fid in /home/afrocepc/public_html/sites/all/modules/flag/flag.module on line 1282"

Needless to say, I'm one newbie who really needs your help right now.

Again, thanks in advance.

rc2020’s picture

Ensure you didn't remove the flag friend relationship on the pending view.

edufol’s picture

I can't find any solution.... anyone?

Thx!!!

anybody’s picture

Hi,

here is the solution:
1. Open your views list.
2. Find your "flags_*" View (in my case it was flag_bookmarks)
3. Switch through all displays and have a look at the relationships! Make sure that the right flag is selected. In my case I had changed the flag name before so no flag was selected!

That's it! :)

hansrossel’s picture

It happens when you add a flag relationship in a page or block display using "overridden values" and then add a flag field to the same display but this time using "default values". This results in the default display having a flag field but no flag relationship.