[buddypress-trac] [BuddyPress Trac] #6757: Empty Groups appear in Extended Profile on WP Admin causing error during save

buddypress-trac noreply at wordpress.org
Tue Dec 1 05:45:53 UTC 2015


#6757: Empty Groups appear in Extended Profile on WP Admin causing error during
save
----------------------------------+-----------------------------
 Reporter:  garrett-eclipse       |      Owner:
     Type:  defect (bug)          |     Status:  new
 Priority:  normal                |  Milestone:  Awaiting Review
Component:  Component - XProfile  |    Version:  2.4.0
 Severity:  normal                |   Keywords:
----------------------------------+-----------------------------
 Hello,

 While working with Buddypress Admin Only Profile fields I ran into an
 issue with the Extended Profile within the WP Admin. If you have an
 XProfile Group containing all Admin fields it appears empty on the
 Extended Profile and causes an issue during save.

 On save we get an error;
 "There was a problem updating some of your profile information. Please try
 again."

 This isn't an issue on the front end edit screen as the group is hidden
 from tabs when it doesn't have any fields.

 Would appreciate if a check for if the group has fields (available to the
 user) be introduced into the bp_profile_groups loop within
 register_metaboxes on line 788 of bp-xprofile-admin.php, in this code;
 {{{#!php
 <?php
 // Loop through field groups and add a metabox for each one.
 while ( bp_profile_groups() ) : bp_the_profile_group();
         add_meta_box(
                 'bp_xprofile_user_admin_fields_' . sanitize_key(
 bp_get_the_profile_group_slug() ),
                 esc_html( bp_get_the_profile_group_name() ),
                 array( $this, 'user_admin_profile_metaboxes' ),
                 $screen_id,
                 'normal',
                 'core',
                 array( 'profile_group_id' => absint(
 bp_get_the_profile_group_id() ) )
         );
 endwhile;
 }}}

 I presume this issue would affect other plugins and custom code which
 excludes access to certain fields potentially leaving fields groups with
 no accessible fields.

 Plugin Reference: https://wordpress.org/plugins/buddypress-admin-only-
 profile-fields/
 Plugin Github: https://github.com/A5hleyRich/buddypress-admin-only-
 profile-fields/
 Github Issue: https://github.com/A5hleyRich/buddypress-admin-only-profile-
 fields/issues/13

 Thank you

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6757>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list