[buddypress-trac] [BuddyPress Trac] #5472: xprofile_insert_field -> type - 'option' not allowed?

buddypress-trac noreply at wordpress.org
Sun Jun 15 16:41:58 UTC 2014

#5472: xprofile_insert_field -> type - 'option' not allowed?
 Reporter:  shanebp       |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  2.1
Component:  XProfile      |     Version:  1.9.2
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
Changes (by shanebp):

 * status:  closed => reopened
 * resolution:  fixed =>


 Found an odd issue...

 I guess we need to use 'field_order' instead of 'option_order' because
 if ( $this->type_obj->supports_options ) {
 will fail for field_types[] = 'option'; ... ?

 This script works fine the ''first'' time

 But if you delete the Country field and then run the script again, the
 display order does not follow the field_order. On the second run, all the
 database fields are exactly the same, except for the 'id' field which is

 If I delete the Country field ( via page=bp-profile-setup )  and then
 manually set the auto-increment value for the bp_xprofile_fields table to
 the next unused id, and then run the script, the display order follows the
 field_order. I don't understand why that is.

 Perhaps this request has opened a can of worms.
 And it might be best to roll-back the change-set.
 And for programatically inserting fields, use xprofile_insert_field to
 create the type and $wpdb->insert to create the options.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5472#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list