Bug #12203
closedSome blogmeta keys appear multiple times for a given site
0%
Description
While investigating another ticket, I noticed that certain blogmeta keys are often duplicated for a given blog. In particular, it seems limited to the following keys, which mirror WP site settings: description, site_icon_url_full, site_icon_url_thumb, comment_moderation, close_comments_for_old_posts, and a few instances of 'url'.
These settings are mirrored by BP using the bp_blogs_update_blogmeta()
function, which should theoretically check for duplicates. The overwhelming majority of the duplicates have a falsey value - 0 or an empty string - which leads me to believe that a loose check (! $value
or something like that) is to blame.
There's a very small handful of non-falsey duplicates, which must be caused in a different way.
I'll spend a few minutes to see if I can uncover whether this is a BP bug, and then I'll write a script that cleans up the duplicates.
Files
Updated by Boone Gorges almost 5 years ago
- File dedupe-blogmeta.php dedupe-blogmeta.php added
I'm attaching a script for deduplicating blogmeta, which has been run on the Commons. (A backup of this table before the script is in my home directory.)
I'll spend time in the next couple weeks looking into the source of the issue. Ray, any ideas in the interim would be welcome.
Updated by Boone Gorges almost 5 years ago
- Target version changed from 1.16.2 to 1.16.3
Updated by Boone Gorges almost 5 years ago
- Target version changed from 1.16.3 to 1.16.4
Updated by Boone Gorges almost 5 years ago
- Target version changed from 1.16.4 to 1.16.5
Updated by Boone Gorges over 4 years ago
- Target version changed from 1.16.5 to 1.16.6
Updated by Boone Gorges over 4 years ago
- Target version changed from 1.16.6 to 1.16.7
Updated by Boone Gorges over 4 years ago
- Target version changed from 1.16.7 to 1.16.8
Updated by Boone Gorges over 4 years ago
- Target version changed from 1.16.8 to 1.16.9
Updated by Boone Gorges over 4 years ago
- Target version changed from 1.16.9 to 1.16.10
Updated by Boone Gorges over 4 years ago
- Status changed from New to Rejected
I just reran the deduplication script and it didn't turn up any dupes. This suggests that whatever was causing the dupes has since been fixed in the codebase. So I think there's nothing else to do.