When I am adding new post and click preview. I get an error

PDOException: SQLSTATE[22018]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Conversion failed when converting the nvarchar value 'new' to data type int.: SELECT fc.* FROM {flagging} fc WHERE ( ([entity_type] = :db_condition_placeholder_0) AND ([entity_id] = :db_condition_placeholder_1) AND( ([uid] = :db_condition_placeholder_2) OR ([uid] = :db_condition_placeholder_3) )AND ([sid] = :db_condition_placeholder_4) ); Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => new [:db_condition_placeholder_2] => 1 [:db_condition_placeholder_3] => 0 [:db_condition_placeholder_4] => 0 ) in flag_get_user_flags() (line 2153 of XXXXX\sites\all\modules\flag\flag.module).

Comments

Raher created an issue. See original summary.

Raher’s picture

I had admin menu enabled and this was disappearing ranndomly
#77 on https://www.drupal.org/node/1622904 seems to have solved both issues

Raher’s picture

Title: Flag module causing error when previewing new post » SQL error when previewing new post
Priority: Normal » Critical
Raher’s picture

Status: Active » Closed (duplicate)

https://www.drupal.org/node/2338579 #13 patch fixed my preview bug, However caused some issues with my flag on the frontend