I'm not sure if this should be in the flag module for improper uninstallation or here. I was running both the heartbeat module and the flag module, and upon disabling only the flag module, my site was reduced to the error:
Fatal error: Class 'flag_flag' not found in /Users/--/sites/all/modules/heartbeat/modules/heartbeat_plugins/plugins/flagattachment.inc on line 271

I couldn't re-enable the flag module to fix it, because the site and drush would both output that error.

To restore the site, I copied the whole flag_flag class from the flag module and temporarily pasted it into the flagattachment.inc file. Once that was done, I could access my site again and disable the heartbeat module. The site still works, and I can only bring the heartbeat module back by reenabling the flag module first, then restoring the heartbeat module to its original code and reenabling that, in that order.

I partly wrote this issue in case anyone else gets stuck with it / so they can use that quick fix to bring their site back. Is this a problem with the flag module or heartbeat module?

Comments

sw3b’s picture

Same for me ! Just got this error...

manumad40’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

I think this is a duplicate of: Error when trying to delete node. You can find a patch there.

Also, this is another similar issue: Error with flag2.0

So, closing this old one as duplicate.

dynahiol’s picture

I'm having the same issue and #2 is not working and the provided solution is also not working. Any patsh or something like that?

manumad40’s picture

Status: Closed (duplicate) » Active