Hi, i have to deactivate Heartbeat plugins because of an error the module FLAG. When i try to delete all the log and if the module Heartbeat plugins is enable i got this error.

PDOException : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pleingaz_sitepgca.flag_content' doesn't exist: DELETE FROM {flag_content} WHERE (content_type = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => heartbeat_activity ) dans HeartbeatFlagPlugin->activityRemoved() (ligne 106 dans /home/username/www/www/sites/sitepgca/modules/heartbeat/modules/heartbeat_plugins/includes/heartbeatflagplugin.inc).

Also I notice under the section flag an error with the flag plugins. We cannot use the flag plugins it is in the disable section. If you need more details let me know.

Also i think this could be related with this issue also. #1805468: After disabling the 'flag' module, the 'heartbeat' module kills my site Last day i have to recover with a backup when i disable flag. There is a link between the two module who is not right. The site crash (blank screen) and was not able to recover from it unless i remove one of the two module manually.


#1 heartbeatflagplugin.inc_.patch1.79 KBmelsawy
Members fund testing for the Drupal project. Drupal Association Learn more


melsawy’s picture

Flag module rename its table and fields name and Heartbeat still do queries with old table name

This patch to apply queries on right table and fields name

glynster’s picture

After applying the patch this is what is returned:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /heartbeat/ajax/flagged/45301
StatusText: error
ResponseText: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'DATABASE.flagging' doesn't exist: SELECT u.name, files.uri, f.uid FROM {file_managed} files INNER JOIN {users} u ON u.picture = files.fid INNER JOIN {flagging} f ON f.uid = u.uid WHERE entity_id = :uaid AND entity_type = 'heartbeat_activity' ; Array
[:uaid] => 45301

melsawy’s picture

What's the flag version you use?

glynster’s picture

I am using: 7.x-2.0

kietnguyen’s picture

Status: Active » Needs review

The patch in #1 worked for me. I'm using flag 7.x-3.0-alpha4+68-dev and heartbeat 7.x-1.1. Also, I think this error is similar, so I made a similar patch for it and it's worked for my case when I delete a comment. Thanks, melsawy.

seanansa’s picture

Issue summary: View changes

#1 worked for me