Opened 11 years ago
Last modified 5 years ago
#27743 assigned defect (bug)
"Change role to..." omitted from bottom of users table shown to single site admin in multi-site
Reported by: | sootsnoot | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.7 |
Component: | Users | Keywords: | needs-patch |
Focuses: | ui, multisite | Cc: |
Description
For more background, see multisite forum discussion https://wordpress.org/support/topic/how-can-a-multisite-site-admin-change-a-users-role?replies=6#post-5437492 where the mod thought this might be worth a ticket.
Browsing the current sources for trunk, I can see that the problem is present at line 206: https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-users-list-table.php#L206
My personal feeling is that even for filtering controls, having them present in the line of controls at the top of tables but absent in the line at the bottom of the tables is not a good idea, but I'll concede that it's debatable.
However, I believe that for this case of showing the "Change role to..." bulk action at the top of the users shown to single-site admins in a multi-site network, but omitting it from the bottom of the table, where it clearly ought to be present beside the Bulk Actions control, is a bug.
The attached screenshot shows the problem (using 3.7.1). Deleting these lines from the trunk version of class-wp-users-list-table.php
fixes the problem (tested in 3.7.1).
Attachments (3)
Change History (16)
#1
@
11 years ago
Urgg, I forgot to include the lines to be deleted. The trunk version of class-wp-users-list-table.php
has:
205 function extra_tablenav( $which ) { 206 if ( 'top' != $which ) 207 return; 208 ?
Deleting lines 206 and 207 solves the problem.
#3
@
10 years ago
My opinion I would have to agree that from a UI standpoint it feels like a bug. Is there some reasoning why "Change role to..." was left from the bottom with version 3.1.0 that's not apparent now multiple versions later?
If it is decided to add "Change role to..." to the bottom. Is it the best strategy to delete line 206 and 207? Or maybe just a add logic to check for "bottom" in case the "extra_tablenav" function is called (or will be called ) elsewhere?
protected function extra_tablenav( $which ) { if ( 'top' != $which && 'bottom' != $which ) return;
@
10 years ago
I added logic to check variable $which for both "top" and "bottom" to display "Change role to..." dropdown in user table
#6
follow-up:
↓ 7
@
10 years ago
While we're in here, what if we added a "Change role to" option to the bulk actions dropdown and only showed the role dropdown when that's selected (with JS on). It's a bulk action - seems awkward to have it separated like that in the first place, even though I can see why it went that way originally.
#7
in reply to:
↑ 6
@
10 years ago
Replying to helen:
While we're in here, what if we added a "Change role to" option to the bulk actions dropdown and only showed the role dropdown when that's selected (with JS on). It's a bulk action - seems awkward to have it separated like that in the first place, even though I can see why it went that way originally.
I like that idea. Having one of the bulk actions broken out as an extra bulk action is weird.
It may seem a bit strange for changing the role for individual users as there is no "quick edit" for users. I almost don't want it to say "Bulk Actions", but just "Actions". Having another besides "Remove" would at least justify the plural. :)
Anyhow, +1 overall for seeing what merging the menus would feel like.
#10
@
9 years ago
- Milestone changed from Awaiting Review to 4.4
- Owner set to wonderboymusic
- Status changed from new to assigned
#11
@
9 years ago
27743.2.diff is the first part of this
screenshot showing the missing control at the bottom of the users table