I get this error message whenever I try to Delete a node/post from my site "PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tohbad.flag_content' doesn't exist: DELETE FROM {flag_content} WHERE (content_type = :db_condition_placeholder_0) AND (content_id IN (:db_condition_placeholder_1, :db_condition_placeholder_2)) ; Array ( [:db_condition_placeholder_0] => heartbeat_activity [:db_condition_placeholder_1] => 39 [:db_condition_placeholder_2] => 40 ) in HeartbeatFlagPlugin->activityRemoved() (line 106 of C:\Users\dray\Desktop\Tohbad site\sites\all\modules\heartbeat\modules\heartbeat_plugins\includes\heartbeatflagplugin.inc)." Please can someone help me find a solution? thanks in advance

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RaphaelBriskie’s picture

Category: Support request » Bug report
Issue summary: View changes

I'm getting the exact same error message, did you have any luck with it?

RaphaelBriskie’s picture

Component: Miscellaneous » Code
RaphaelBriskie’s picture

Title: heartbeatflagplugin.inc) » Error when trying to delete node.

To elaborate a little, it prevents the node from being deleted at all.

kevinquillen’s picture

This is because in Flag 3.x the flag_content table was renamed to flagging. I just ran into this same error. It does not appear that Heartbeat is equipped to work with Flag 3.x.

You will want to amend (and perhaps post a patch) the HeartbeatFlagPlugin class, and change instances of flag_content to flagging and ensure any Heartbeat queries using flag_content respect the new table field names.

I tracked this down via this post indicating the change: https://www.drupal.org/node/1870300#comment-7524067

jackman’s picture

hi, i had the same error, but with statuses module, so guiding myself with kevinquillen info at the other post, i found that by replacing {flag_content} to {flagging}, {flag_content} to {entity_type}, {content_type} to {entity_type} and {content_id} to {entity_id} on heartbeatflagplugin.inc (in your case) you must disable that error, i wish you can solve it with this info

blur702’s picture

I had this same issue with a fresh install of all referenced modules. To fix the problem I changed the following in heartbeatflagplugin.inc:

Changed all instanced in the file from {flag_content} to {flagging}
Changed all instanced in the file from {content_type} to {entity_type}
Changed all instanced in the file from {content_id} to {entity_id}

This seems to have fixed the problem, for now.

raul_drupal_dev’s picture

blur702 it's working for me! can you please report a patch??

Thanks!

Pravin Ajaaz’s picture

Here is the patch to fix this

Pravin Ajaaz’s picture

Status: Active » Needs review
Pravin Ajaaz’s picture

liquidcms’s picture

Status: Needs review » Reviewed & tested by the community

patch works for me.

last post over a year ago; reasonable to assume this module is no longer being maintained?

veronicaSeveryn’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
3.51 KB

I am using Heartbeat 1.1.0 and Flag 3.9.0 and I was checking the code in Heartbeat based on the patch in #8.

I feel like there're a few more places where a change needs to be implemented. Revised patch attached.

delacosta456’s picture

hi
both two patch DOES NOT worked for me.

However this patch, for flag plugin on this issue ,https://www.drupal.org/node/2102743 also solve the deleting problem here.. (for me)

Nhungnb’s picture

Here is the patch to fix this