Error (below) returned when adding or removing a user from a group with an OG Promote role associated. I think the structure of the call to cache_clear_all is incorrect (or old). I don't have locale enabled, but the cache_menu database shows the CID as userid:locale (1:en, for example). Also, the table which is being cleared from needs to be identified as a string.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 WHERE cid = 'menu:9'' at line 1 query: cache_clear_all DELETE FROM 1 WHERE cid = 'menu:9' in \includes\database.mysql.inc on line 172.

Fix (in og_promote.module):
Change lines 51 and 70 from:
cache_clear_all('menu:'. $user->uid, TRUE);
to
cache_clear_all($user->uid . ":" . $locale, 'cache_menu', TRUE);

Also, I added this at line 40:
global $locale;

I'm not sure how to submit a patch, if someone can confirm this bug exists and that my fix works I'll try to do so.

Thanks!

Comments

mariano.barcia’s picture

AjK’s picture

Status: Active » Closed (duplicate)