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
Comment #1
joachim commentedHave you cleared all your caches?
What entity is your flag on?
Comment #2
Anonymous (not verified) commentedCaches 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.
Comment #3
joachim commentedCould you install devel module and add this at line 1422:
Comment #4
Anonymous (not verified) commentedJust 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.
Comment #5
joachim commentedCould you file a separate bug report for that please? Each issues should be about just one problem.
Comment #6
joachim commentedActually, don't -- it's already been filed and fixed in dev: #1710302: Missing curly braces for 'flags' table in function flag_field_attach_delete_bundle().
Comment #7
Anonymous (not verified) commentedInstalled dev module. /sites/all/modules/flag/flag.inc appears to only have 115 lines?
Comment #8
joachim commentedWhich version of flag are you on?
Comment #9
Anonymous (not verified) commentedNow 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
Comment #10
Anonymous (not verified) commentedAny 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.
Comment #11
Anonymous (not verified) commentedGot site functional by deleting Heartbeat module. Will reinstall after full removal and drush cc of Flags.
Comment #12
Anonymous (not verified) commentedLooks 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?
Comment #13
Anonymous (not verified) commentedComment #14
joachim commented> 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!
Comment #15
Anonymous (not verified) commentedThis 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??
Comment #16
joachim commentedCould you just output the flag class that is causing the problems you report in get_views_info()?
Comment #17
Anonymous (not verified) commentedAdding dsm($this); to line 1422 of 2.x-dev causes WSOD. removal returns functional site, with errors identified above.
Comment #18
joachim commentedDid you enable devel module?
Comment #19
Anonymous (not verified) commenteddev module is enabled. not sure how to output the class flag?
Comment #20
Anonymous (not verified) commentedGetting 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?
Comment #21
joachim commented> 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?
Comment #22
Anonymous (not verified) commentedThanks 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.
Comment #23
captainpants commentedFYI 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.
Comment #24
joachim commentedIs 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...
Comment #25
captainpants commentedThat'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.
Comment #26
captainpants commented... 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.
Comment #26.0
captainpants commentedadded core version - 7.15
Comment #27
ivnishClosed as outdated because Drupal 7 is EOL