[buddypress-trac] [BuddyPress Trac] #5666: "Settings > Profile" hidden field doesn't list all field IDs

buddypress-trac noreply at wordpress.org
Wed Aug 13 00:30:12 UTC 2014


#5666: "Settings > Profile" hidden field doesn't list all field IDs
-------------------------------------------+---------------------------
 Reporter:  r-a-y                          |       Owner:  boonebgorges
     Type:  defect (bug)                   |      Status:  closed
 Priority:  normal                         |   Milestone:  2.1
Component:  XProfile                       |     Version:  2.0
 Severity:  normal                         |  Resolution:  fixed
 Keywords:  dev-feedback has-patch commit  |
-------------------------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"8819"]:
 {{{
 #!CommitTicketReference repository="" revision="8819"
 Introduce bp_the_profile_field_ids(), and use as appropriate throughout BP

 The POST routine run when editing one's xprofile-powered profile (or
 registering for an account when the registration form includes xprofile
 fields)
 works in part by sending a list of field IDs in the 'field_ids' <input>
 element.
 These field IDs are then used to decide which POST keys to look for when
 saving
 submitted profile values. Historically, the function powering this
 field_ids
 element has been bp_the_profile_group_field_ids(), which pulls up only the
 field IDs from a single field group. Normally this works fine, because the
 typical Profile > Edit screen only allows for the editing of a single
 field
 group at a time. However, the introduction in BP 2.0 of Settings > Profile
 demonstrates that this technique breaks when attempting to save more than
 one
 field group at a time.

 The new bp_the_profile_field_ids() replaces this logic by pulling up all
 the
 field_ids from all the groups in the $profile_template global object.

 In order to provide for backward compatibility with themes that may have
 overridden the modified templates (in particular,
 members/single/settings/profile.php),
 we add logic to the Settings > Profile save routine that looks for any
 submitted profile fields that are not present in the field_ids array.

 Fixes #5666

 Props boonebgorges, r-a-y
 }}}

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


More information about the buddypress-trac mailing list