Drupal core 7.15. Getting error "Notice: Undefined index: base table in flag_entity->get_views_info() (line 1422 of" with latest flag module installed.

Complete error msg follows:

Notice: Undefined index: base table in flag_entity->get_views_info() (line 1422 of /home1/reallig1/public_html/sites/all/modules/flag/flag.inc).
Notice: Undefined index: id in flag_entity->get_views_info() (line 1423 of /home1/reallig1/public_html/sites/all/modules/flag/flag.inc).
Notice: Undefined index: base table in flag_entity->get_views_info() (line 1422 of /home1/reallig1/public_html/sites/all/modules/flag/flag.inc).
Notice: Undefined index: id in flag_entity->get_views_info() (line 1423 of /home1/reallig1/public_html/sites/all/modules/flag/flag.inc).
Notice: Undefined index: base table in flag_entity->get_views_info() (line 1422 of /home1/reallig1/public_html/sites/all/modules/flag/flag.inc).
Notice: Undefined index: id in flag_entity->get_views_info() (line 1423 of /home1/reallig1/public_html/sites/all/modules/flag/flag.inc).

Comments

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

Have you cleared all your caches?
What entity is your flag on?

Anonymous’s picture

Priority: Major » Normal

Caches cleared several times did not seem to fix it. Error occurs under various conditions, including editing a panel page "Manage Fields" for the first time under "Administration » Structure » Content types » .

If I select "Manage Display", then return to "Manage Fields" error msg disappears...

May have something to do with one of the Facebook Modules I have been experimenting with recently?

Drush cc, all modules up to date.

entity reference 7.x-1.0-rc3

Haven't added any custom flags, but added modules may have?

Also installed Flag Friend and Flag friend access control 7.x-1.0-alpha9.

Priority changed to normal.

joachim’s picture

Could you install devel module and add this at line 1422:

 dsm($this);
Anonymous’s picture

Priority: Normal » Major

Just received a new Flag related error when trying to delete a taxonomy vocabulary:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'reallig1_drp1.flags' doesn't exist: DELETE FROM {flag_types} WHERE type = :bundle AND fid IN (SELECT fid FROM flags WHERE content_type = :entity_type); Array ( [:bundle] => category_location [:entity_type] => taxonomy_term ) in flag_field_attach_delete_bundle() (line 933 of /home1/reallig1/public_html/sites/all/modules/flag/flag.module).

Checked db. Table "dr_flags" exists but no "flags".

Raising bug report back to major.

joachim’s picture

Priority: Major » Normal

Could you file a separate bug report for that please? Each issues should be about just one problem.

joachim’s picture

Anonymous’s picture

Installed dev module. /sites/all/modules/flag/flag.inc appears to only have 115 lines?

joachim’s picture

Which version of flag are you on?

Anonymous’s picture

Now getting WSOD and error: "Fatal error: Class 'flag_flag' not found in /home1/reallig1/public_html/sites/all/modules/heartbeat/modules/heartbeat_plugins/plugins/flagattachment.inc on line 250" when trying to update...

Should be flag-7.x-3.x-dev.tar.gz as that is what I just downloaded. deleted earlier flag module and extracted into sites/all/modules

Anonymous’s picture

Priority: Normal » Critical

Any ideas on how to recover? Deleted dev mod of Flag and copied 7.x-2.0-beta8 back into sites/all/modules but WSOD remains. Cannot access site with Drush.

Anonymous’s picture

Got site functional by deleting Heartbeat module. Will reinstall after full removal and drush cc of Flags.

Anonymous’s picture

Looks like I FTP copied the 7.x-3.x-dev into sites/all/modules which caused the WSOD.

I have now copied in 7.x-2.x-dev and Heartbeat module.

Getting original error, plus reference to fb module:

Notice: Undefined index: base table in flag_entity->get_views_info() (line 1431 of /home1/reallig1/public_html/sites/all/modules/flag/flag.inc).
Notice: Undefined index: id in flag_entity->get_views_info() (line 1432 of /home1/reallig1/public_html/sites/all/modules/flag/flag.inc).
Notice: Undefined index: base table in flag_entity->get_views_info() (line 1431 of /home1/reallig1/public_html/sites/all/modules/flag/flag.inc).
Notice: Undefined index: id in flag_entity->get_views_info() (line 1432 of /home1/reallig1/public_html/sites/all/modules/flag/flag.inc).
Notice: Undefined index: _fb in fb_get_fbu() (line 1069 of /home1/reallig1/public_html/sites/all/modules/fb/fb.module).

Ready to add line in #3, please advise if I should proceed?

Anonymous’s picture

Priority: Critical » Normal
joachim’s picture

> Looks like I FTP copied the 7.x-3.x-dev into sites/all/modules which caused the WSOD.

I really hope you didn't try to put 3.x on a live site. It's not ready for production AT ALL. And yes, it WSODs the second you install it -- that's known and normal, and you need to go to update.php as soon as you upgrade it. But don't!!!!

> Ready to add line in #3, please advise if I should proceed?

Yes. But you should really do this sort of thing on a dev copy, not your live site!

Anonymous’s picture

This is a dev site, so nothing to worry about, but thanks for the concern. WSOD was easily recovered by removing heartbeat and 3.x, then re-install of 2.x and hearbeat.

For new drupal site developers, note that the heartbeat module and the flag 3.x folders were deleted from site/all/modules, then the flag 2.x module and heartbeat module folders were copied into sites/all/modules. At this point the WSOD ceased, and the site could be managed again.

Should the #3 line be added at 1422 or 1431, it seems like the error msg now (2.x-dev) points to 1431/1432??

joachim’s picture

Could you just output the flag class that is causing the problems you report in get_views_info()?

Anonymous’s picture

Adding dsm($this); to line 1422 of 2.x-dev causes WSOD. removal returns functional site, with errors identified above.

joachim’s picture

Did you enable devel module?

Anonymous’s picture

dev module is enabled. not sure how to output the class flag?

Anonymous’s picture

Getting this item in dev log display when loading page with error message:

flag_get_flags P A E
SELECT f.fid AS fid, f.content_type AS content_type, f.name AS name, f.title AS title, f.global AS global, f.options AS options, fn.type AS type FROM dr_flags f LEFT OUTER JOIN dr_flag_types fn ON fn.fid = f.fid

Not sure if that is any help?

joachim’s picture

> not sure how to output the class flag?

When you're in the class, output $this. You've not told me what action triggers the problem; if it's a JS action then dsm() won't work. You could try the devel_debug_log module instead. If you're still stumped, maybe ask for help on IRC?

Anonymous’s picture

Thanks Joachim. I'll figure it out this week and post. In the meantime, I downgraded to beta 7 version and the error seems to have disappeared.

captainpants’s picture

FYI I'm using the latest stable version of 7.x2-0

I am getting a similar issue, however I'm just getting a...

"Notice: Undefined index: id in flag_entity->get_views_info() (line 1460 of /home/angeloporretta/Dev/HTN/sites/all/modules/flag/flag.inc)."

This is caused by the location_node module (and perhaps the location_user module as well).
When I kpr($entity_info) it gives me a list of entities. Enabling the location_node module will give one entity whose base table is location_locations and does not have an id entity key.

I'm don't think this is a huge issue but I'm wondering if there will be more serious errors throughout my Drupal installation.

joachim’s picture

Is that this module: http://drupal.org/project/location ?

> When I kpr($entity_info) it gives me a list of entities. Enabling the location_node module will give one entity whose base table is location_locations and does not have an id entity key.

Is your flag on location entities by any chance? If you disable the module and the entity goes away, then the flag will struggle to work...

captainpants’s picture

That's the module. I forgot to mention that im using the 7.x-4 branch which you can get through git.

My flag is only on one content type and that content type does not have any locative information (minimum and maximum locations are set to 0).

Disabling the location_node module does makes the notice go away.

captainpants’s picture

... And therein lay the problem. The 7.x-4 branch of location isn't supposed to be for production sites so there was bound to be a bug or two.

I reverted to 7.x-3.0-alpha1 and the notice does not appear anymore.

captainpants’s picture

Issue summary: View changes

added core version - 7.15

ivnish’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)

Closed as outdated because Drupal 7 is EOL