[buddypress-trac] [BuddyPress Trac] #6685: XProfile name field created through multiple triggers

buddypress-trac noreply at wordpress.org
Mon Oct 26 15:12:19 UTC 2015


#6685: XProfile name field created through multiple triggers
----------------------------------+------------------------------
 Reporter:  Rourke                |       Owner:
     Type:  defect (bug)          |      Status:  new
 Priority:  high                  |   Milestone:  Awaiting Review
Component:  Component - XProfile  |     Version:
 Severity:  major                 |  Resolution:
 Keywords:                        |
----------------------------------+------------------------------

Comment (by boonebgorges):

 The problem would presumably be in `bp_core_install_extended_profiles()`,
 in src/bp-core/admin/bp-core-admin-schema.php. At the end of that
 function, BP creates field group 1 and field 1 if none are found. So the
 existing field check(s) must be failing in your case. They look like this:

 {{{
 $wpdb->get_var( "SELECT id FROM {$bp_prefix}bp_xprofile_fields WHERE id =
 1" )
 }}}

 It's a bit odd that we hardcode the id of `1` here, but it's worth noting
 that throughout BuddyPress we assume that the Name field has the ID of
 `1`. So if you deleted your Name field and then recreated it (with a new
 ID, due to auto-increment), lots of stuff in BP would likely break, not
 just this.

 Rourke, are you able to do some debugging around this? Is it possible that
 something on your installation - a plugin, etc - is causing the Name field
 to be deleted when you deactivate xprofile? What is the `id` of the Name
 field in your `wp_bp_xprofile_fields` database table? If it's not `1`, how
 did it get to be something other than `1`? :)

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6685#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list