Project

General

Profile

Actions

Bug #12203

closed

Some blogmeta keys appear multiple times for a given site

Added by Boone Gorges almost 5 years ago. Updated over 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 #1

Updated by Boone Gorges almost 5 years ago

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.

Actions #2

Updated by Boone Gorges almost 5 years ago

  • Target version changed from 1.16.2 to 1.16.3
Actions #3

Updated by Boone Gorges almost 5 years ago

  • Target version changed from 1.16.3 to 1.16.4
Actions #4

Updated by Boone Gorges almost 5 years ago

  • Target version changed from 1.16.4 to 1.16.5
Actions #5

Updated by Boone Gorges over 4 years ago

  • Target version changed from 1.16.5 to 1.16.6
Actions #6

Updated by Boone Gorges over 4 years ago

  • Target version changed from 1.16.6 to 1.16.7
Actions #7

Updated by Boone Gorges over 4 years ago

  • Target version changed from 1.16.7 to 1.16.8
Actions #8

Updated by Boone Gorges over 4 years ago

  • Target version changed from 1.16.8 to 1.16.9
Actions #9

Updated by Boone Gorges over 4 years ago

  • Target version changed from 1.16.9 to 1.16.10
Actions #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.

Actions

Also available in: Atom PDF