[buddypress-trac] [BuddyPress Trac] #5570: `bp_get_member_profile_data` showing wrong values cached for other users

buddypress-trac noreply at wordpress.org
Wed Mar 25 15:03:54 UTC 2015


#5570: `bp_get_member_profile_data` showing wrong values cached for other users
-------------------------------------------+-------------------------------
 Reporter:  frederick.ding                 |       Owner:
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  Under
Component:  Component - XProfile           |  Consideration
 Severity:  major                          |     Version:  2.0
 Keywords:  needs-patch reporter-feedback  |  Resolution:
-------------------------------------------+-------------------------------

Comment (by jlooooo):

 Hi,

 It's a theme. I copied members-loop.php from wp-content/plugins/buddypress
 /bp-templates/bp-legacy/buddypress/members/members-loop.php to wp-
 content/themes/my-theme/buddypress/members/members-loop.php.

 Under

 {{{
 /***
 * If you want to show specific profile fields here you can,
 * but it'll add an extra query for each member in the loop
 * (only one regardless of the number of fields you show):
 *
 * bp_member_profile_data( 'field=the field name' );
 */
 }}}
 I added the code mentioned earlier.

 I just added wp_cache_flush(); after

 {{{
 <?php while ( bp_members() ) : bp_the_member(); ?>
 }}}
 in members-loop.php in my-theme on production and now the correct values
 are shown.

 Not sure how I can debug this.

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


More information about the buddypress-trac mailing list