Skip to:

#8752 closed defect (bug) (worksforme)

Member List Fails to Display When Adminstering Group

Reported by: pgrafix's profile pgrafix Owned by: imath's profile imath
Milestone: Priority: normal
Severity: normal Version: 10.4.0
Component: Groups Keywords: reporter-feedback


Member list fails to load on the group admin front end or back end for a single group after adding a multiple members in a single addition.

Console errors:


Uncaught TypeError: Cannot read properties of undefined (reading ‘name’)
    at eval (eval at template (underscore.min.js?ver=1.13.1:2:15327), <anonymous>:29:18)
    at n (underscore.min.js?ver=1.13.1:2:15407)
    at n.template (wp-util.min.js?ver=350dcb35f552474cc66408105b81368d:2:323)
    at n.render (wp-backbone.min.js?ver=350dcb35f552474cc66408105b81368d:2:2893)
    at wp.Backbone.Subviews.<anonymous> (wp-backbone.min.js?ver=350dcb35f552474cc66408105b81368d:2:2140)
    at underscore.min.js?ver=1.13.1:2:6433
    at Function.dr (underscore.min.js?ver=1.13.1:2:9528)
    at wp.Backbone.Subviews._attach (wp-backbone.min.js?ver=350dcb35f552474cc66408105b81368d:2:2101)
    at wp.Backbone.Subviews.set (wp-backbone.min.js?ver=350dcb35f552474cc66408105b81368d:2:884)

FF (underscore.min.js:29:1):

Uncaught TypeError: data.role is undefined
    Underscore 2
    template https://mydomain/wp-includes/js/wp-util.min.js?ver=350dcb35f552474cc66408105b81368d:2
    Backbone 2
    Underscore 2
    Backbone 3
    addListTableRows Ember
    Underscore 2
    addListTableRows Ember
    Backbone 5
    initialize Ember
    Backbone 4
    initialize Ember
    Backbone 4
    Ember 2


TypeError: undefined is not an object (evaluating ‘’)
    anonymous (Anonymous Script 1 (line 28))
    n (underscore.min.js:2:15412)
    (anonymous function) (wp-util.min.js:2:324)
    render (wp-backbone.min.js:2:2902)
    (anonymous function) (wp-backbone.min.js:2:2147)
    (anonymous function) (underscore.min.js:2:6438)
    dr (underscore.min.js:2:9530)
    _attach (wp-backbone.min.js:2:2106)
    set (wp-backbone.min.js:2:892)
    add (wp-backbone.min.js:2:1005)
    (anonymous function) (manage-members.min.js:1:8475)
    (anonymous function) (underscore.min.js:2:6438)
    dr (underscore.min.js:2:9530)
    addListTableRows (manage-members.min.js:1:8439)
    p (backbone.min.js:2:3194)
    f (backbone.min.js:2:2931)
    a (backbone.min.js:2:843)
    (anonymous function) (backbone.min.js:2:2815)
    reset (backbone.min.js:2:10387)
    initialize (manage-members.min.js:1:8226)
    (anonymous function) (backbone.min.js:2:14145)
    constructor (wp-backbone.min.js:2:2606)
    (anonymous function) (backbone.min.js:2:23432)
    (anonymous function) (backbone.min.js:2:23432)
    initialize (manage-members.min.js:1:9254)
    (anonymous function) (backbone.min.js:2:14145)
    constructor (wp-backbone.min.js:2:2606)
    (anonymous function) (backbone.min.js:2:23432)
    (anonymous function) (backbone.min.js:2:23432)
    (anonymous function) (manage-members.min.js:1:9325)
    Global Code (manage-members.min.js:1:9369)

Removing the added members from the group via the database restores the displaying of the member list. Adding any one of them back to the group immediately stops the member list from displaying again.

Have traced the issue to potentially line 89 of /buddypress/bp-templates/bp-nouveau/buddypress/common/js-templates/group-members/index.php

88 <# if ( ! data.editing  && ! data.managingBan && ! data.removing ) { #>
89			{{}}
90		<#} else {

If I remove {{}} the list of members is restored in both the front and back end. However, removal of this block of code also removes the member's role display in the Roles column under Manage Members.

Attachments (1)

Screen Shot 2022-10-08 at 4.38.41 PM.png (49.7 KB) - added by pgrafix 19 months ago.
Screen shot of the affected Manage Members section of the group

Download all attachments as: .zip

Change History (6)

#1 @pgrafix
19 months ago

One additional error statement:

TypeError: data.role is undefined /wp-includes/js/underscore.min.js?ver=1.13.1 line 2 > Function line 29

Updating this file (and underscore.js) to the latest version (1.13.6) doesn't alleviate the issue.

Last edited 19 months ago by pgrafix (previous) (diff)

19 months ago

Screen shot of the affected Manage Members section of the group

#2 @imath
18 months ago

  • Component changed from Templates to Groups
  • Keywords reporter-feedback added
  • Priority changed from high to normal

Hi @pgrafix

Thanks a lot for your feedback, screenshots and error console information. I've just tried to reproduce adding 2 new members to the group and everything works as expected, see the screenshot below:

Have you made sure to deactivate all plugins but BuddyPress, remove any plugins/bp-custom.php or mu-plugins/* files and temporarily switch to a WordPress default before checking it was a BuddyPress issue ?

#3 @pgrafix
18 months ago

I have:

  • Tested for plugin conflicts. Even stripped down to just BP running, but issue persists.
  • Tested for theme issues. Issue persists.
  • Disabled bp-custom. Issue persists.
  • Restored theme functions.php to default. Issue persists.
  • Nothing in the server error logs.

I do get the success message on additions and the additions are in the bp_group_members table in the DB. The issue is that the list of members stops displaying, which makes member management for the end user (I am the dev) more difficult (e.g., member searches are blank, not knowing the role of a member, etc.).

Last edited 18 months ago by pgrafix (previous) (diff)

#4 @imath
18 months ago

  • Owner set to imath
  • Status changed from new to reviewing

Thanks for your reply, I’ll test it again with a 10.4 build, I guess I might not see the issue with trunk and latest BP REST API.

#5 @imath
18 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from reviewing to closed

I've just tested with BP 10.4.0 and WP 6.0.2 (instead of development versions of BP, WP, and the BP REST API).

I wasn't able to reproduce. So everything is fine to me.

Note: See TracTickets for help on using tickets.