The full error message on a white screen is:

Fatal error: Call to undefined function _flag_content_enabled() in /path/to/all/modules/heartbeat/modules/heartbeat_plugins/plugins/flagattachment.inc on line 79

It is shown after I clicked "user activity" or "user relation activity" on the "/user" page.

Flag version: 7.x-3.0-alpha3+4-dev
Heartbeat version: both 7.x-1.1 and 7.x-1.x-dev
Is that because the current heartbeat plugin only supports to Flag version 7.x-2.x, but not 3.0 yet?

Comments

metakel’s picture

Status: Active » Fixed

After a few operations of enable / disable / enable /disable of various modules, I finally get it back to work.

I cannot explain what the reason is. The "user activity" and "user relation activity" just suddenly work again.

Now it is Heartbeat 7.x-1.1 and Flag 7.x-3.0-alpha3+4-dev

Status: Fixed » Closed (fixed)

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

flashwebcenter’s picture

Version: 7.x-1.x-dev » 7.x-1.1
Status: Closed (fixed) » Active

The following error comes with white screen when you go to /admin/structure/heartbeat/plugins and enable flagattachment.
Then go to my account and click on user activity or user relations activity
Fatal error: Call to undefined function _flag_content_enabled() in ../sites/all/modules/contrib/heartbeat/modules/heartbeat_plugins/plugins/flagattachment.inc on line 79
I have installed Drupal 7.19, Heartbeat 7.x-1.1, Flag 7.x-3.0-alpha4.
I tested for several times as an admin or authenticated user.

afoone’s picture

Same problem. Any Solutions?

capchicon’s picture

Same problem here.but after i have installed 'views 3' i am getting this problem.still didn't get a solution for this.please give me a solution for this error..
Thanks in advance

capchicon’s picture

Still there is no reply...pls someone pls do help me for this problem..:(

prezaeis’s picture

anyone? is there any support for this module?

fraweg’s picture

Hello,

I use the actual heartbeat version with this modules and patches an have no problems:

https://drupal.org/node/1700116
flag 7.x-2.1

I hope this helps!

Best regards
Frank

chythar’s picture

Issue summary: View changes

I looked into the issue, and the method looks like it is checking to see if the flag is set to be an 'heartbeat_activity' flag. If so, it's added to the list of plugins on the page. If not, it's removed. With this understanding, I have changed line 79 in modules/heartbeat_plugins/plugins/flagattachment.inc from

if ($this->flag && _flag_content_enabled($this->flag, 'heartbeat_activity')) {

To:

if ($this->flag && $this->flag->access_entity_enabled('heartbeat_activity', NULL)) {

This resolves the error for me, and I have not seen any adverse effects yet. As for a permanent fix, it seems like the Flags module should have a method for "_flag_content_enabled()" that performs the check in my fix.

flydragon865’s picture

#9 works for me too. Thanks @chythar

yanniboi’s picture

Priority: Normal » Critical

This is a module port issue.

The function '_flag_content_enabled()' exists only in the flag module for drupal 6, not drupal 7.

I am raising this to critical because it breaks the functionality of the drupal 7 module.

(Note: #9 also works for me...)

Anusha Vasudevan’s picture

#9 works for me too. Thanks
Am using Heartbeat and flag modules.

Anusha Vasudevan’s picture

Status: Active » Needs review