Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#4139 closed defect (bug) (fixed)

bp_core_get_root_options() overwriting blog options on certain setups

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 1.6 Priority: normal
Severity: major Version:
Component: Core Keywords:
Cc:

Description

bp_core_get_root_options() was recently refactored (see https://buddypress.trac.wordpress.org/changeset/4587, https://buddypress.trac.wordpress.org/ticket/3313) to be better at migration when changing settings. However, the logic for migrating these settings was a bit greedy: if even a single option is found missing in the current root_blog's options table, then *all* of the options get copied over from a previous location (sitemeta, etc).

This has the side effect that some changes are perpetually overwritten. As an example, I discovered this issue in the process of troubleshooting an issue with bp-xprofile-fullname-field-name - I kept changing the name of the field itself in the Dashboard, but the option bp-xprofile-fullname-field-name kept sticking to an old value.

I'm going to commit a fix that takes the following strategy: in cases where the relevant options are found on the current root_blog, keep them - only attempt to migrate *missing* settings.

Change History (2)

#1 @boonebgorges
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5976]) When auto-migrating options in bp_core_get_root_options(), don't overwrite option values that are found on the first pass. Fixes #4139

#2 @DJPaul
13 years ago

  • Milestone changed from Awaiting Review to 1.6
Note: See TracTickets for help on using tickets.