An HTTP error 500 occurred.
http://localhost/flag/unflag/flag/522?destination=node/522&token=Y8fPNS9...

The watchdog log provides me the following:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_id' in 'where clause': DELETE FROM {flag_counts} WHERE (fid = :db_condition_placeholder_0) AND (entity_id = :db_condition_placeholder_1) AND (count <= :db_condition_placeholder_2) ; Array ( [:db_condition_placeholder_0] => 2 [:db_condition_placeholder_1] => 522 [:db_condition_placeholder_2] => 1 ) in flag_flag->_decrease_count() (line 1029 of /home/xxx/workspace/xxx/sites/all/modules/flag/includes/flag/flag_flag.inc).

Steps to reproduce

  • Create flag
  • Add flag
  • Enable display suite
  • Enable article view mode
  • Add the entity link to the footer
  • On full view mode utlize 4 column layout
  • move the entity link to the footer
  • Click on and off the flag

I suspect also that this has been caused because my flag install didn't install all the tables. I often get an error indicating that flag table already exists.

Comments

chrisjlee’s picture

Issue summary: View changes

Updated issue summary.

chrisjlee’s picture

Status: Active » Fixed

Looks like flag was partially installed and that was the cause of my error. I had to manually remove the flag module

What i did was i had to drop the flag tables: flag, flag_count, flag_type and remove the reference from the systems table. cleared the cache too just in case.

Seems to be ok so far.

chrisjlee’s picture

Issue summary: View changes

Updated issue summary.

joachim’s picture

Status: Fixed » Closed (works as designed)

Glad to hear you've figured it out.

Setting the status accordingly (so our issue queue stats don't say we've fixed a bug when we haven't!)

joachim’s picture

Issue summary: View changes

update path