[buddypress-trac] [BuddyPress Trac] #8752: Member List Fails to Display When Adminstering Group
buddypress-trac
noreply at wordpress.org
Sat Oct 8 21:30:48 UTC 2022
#8752: Member List Fails to Display When Adminstering Group
--------------------------+-----------------------------
Reporter: pgrafix | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: Awaiting Review
Component: Templates | Version: 10.4.0
Severity: normal | Keywords:
--------------------------+-----------------------------
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:
Chrome:
{{{
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
underscore.min.js:29:1
}}}
Safari:
{{{
TypeError: undefined is not an object (evaluating ‘data.role.name’)
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 {{data.role.name}}
90 <#} else {
}}}
If I remove {{data.role.name}} 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.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8752>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list