While in the Configuration Screen at the section DrupalChat User Online List Control I have selected the Flag Friend module. When I save I receive

The website encountered an unexpected error. Please try again later.

This appears to be corrupting the database as only a restore will resolve the issue.

Comments

lohner’s picture

I have the same experience with the latest dev version as well.

darklrd’s picture

Which version of Flag Friend module are you using?

lohner’s picture

7.x-2.x-dev

lpedretti’s picture

Apparently the flag current database structure is different. Haven't checked when it changed, but this patch updates this functions to use the current structure.
However, maybe a better solution would be to use some flag api, as that may detach this module from the specific db structure and more compatible with future releases of flag if they decide to change their schema again.

regal’s picture

I had the same problem with 7 x 1.5. The patch seems to work.

erwangel’s picture

suggestions of #4 applied manually on 7-2.8 resolved the problem. Thanks @lpedretti. This is critical because it sets entire site down. it doens't corrupt database as said in the starting message but you can no more access site neither on backend not on frontend. Just disable the module and site comes up. RTBC. Please commit.

reida010’s picture

On our site it was possible to chat with people without accepting the friend request first.
Ich changed the code to

foreach ($result as $friend) {
  if ($friend->status == FLAG_FRIEND_FLAGGED) {
    $users[] = $friend->entity_id;
  }
}
pranav.aeer’s picture

I was facing same error , by using this 'drupalchat-flag_friend_current-2417639-4.patch' patch its working fine. Thanks for patch.

avpaderno’s picture

Version: 7.x-1.4 » 7.x-2.x-dev