Project

General

Profile

Actions

Bug #12203

closed

Some blogmeta keys appear multiple times for a given site

Added by Boone Gorges over 4 years ago. Updated about 4 years ago.

Status:
Rejected
Priority name:
Normal
Assignee:
Category name:
Blogs (BuddyPress)
Target version:
Start date:
2019-12-10
Due date:
% Done:

0%

Estimated time:
Deployment actions:

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

dedupe-blogmeta.php (1.18 KB) dedupe-blogmeta.php Boone Gorges, 2019-12-10 10:54 AM
Actions

Also available in: Atom PDF