issue with bp 2.30 rc1
-
Hi,
I don’t know actually if the issue is with buddypress 2.3.0 rc1 or with another plugin (I know BSALA plugin is not the cause of the problem), but I notice an issue: When someone removes a favorite, it removes ALL of the double quotes (“) from the bp_favorite_activities line in the database! It seems not to affect the regular favorite button (still shows which is favorite and which isnt) but caused a big problem with the plugin, since it only searches for the number in quotes. I have made a modification in case anyone else experiences the issue:
Change this line:
$query = "SELECT user_id FROM ".$wpdb->base_prefix."usermeta WHERE meta_key = 'bp_favorite_activities' AND meta_value LIKE '%:\"$activity_id\";%' ";
To this:
$query = "SELECT user_id FROM ".$wpdb->base_prefix."usermeta WHERE meta_key = 'bp_favorite_activities' AND (meta_value LIKE '%:$activity_id;%' OR meta_value LIKE '%:\"$activity_id\";%') ";
I don’t know if this is actually a good solution or not (I don’t know PHP) but it seems to work for me so far.
- The topic ‘issue with bp 2.30 rc1’ is closed to new replies.