Bug report / fix: Comments getting shown on wrong links
-
The generate_cloud_id function in bp-links-classes.php generates an id which is incompatible with how buddypress stores item_ids (BIGINT) in the wp_bp_activity table. This results in that column often getting filled with 0 which means that comments are getting shared between all links with an item_id of 0.
I’ve temporarily fixed this on my install by changing the md5 hash generation to a simple concatenation of rand(0,9999) + time() + rand(0,9999) to generate an integer no larger than 20 characters. This seems to have fixed the problem for me.
Code as follows (line 298 of bp-links-classes.php):
private function generate_cloud_id() { global $bp; if ( $this->url ) { return rand(1,999) . time() . rand(1,999); } else { return false; } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Bug report / fix: Comments getting shown on wrong links’ is closed to new replies.