#48725 closed defect (bug) (fixed)
Additional Capabilities list displayed in user-edit broke after 5.3 update
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.3.1 | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Users | Keywords: | has-patch has-screenshots |
Focuses: | ui, administration | Cc: |
Description
Found a strange bug. List of Additional Capabilities in the user-edit page is replaced with '1,1,1,1' after WordPress 5.3 update.
Screenshot: https://www.dropbox.com/s/61sb1t81vgwpdsz/image_2019_11_19T12_55_24_093Z.png?raw=1
Steps to reproduce
- Edit any user with additional capabilities (user-edit.php)
- Scroll down to 'Additional Capabilities' section
Attachments (4)
Change History (10)
#2
@
6 years ago
It is happening because value
(boolean flag for capability) is being ouputted instead of capability.
Added patch.
#3
@
6 years ago
Steps to reproduce the issue.
- Login to site
- Add this code to functions.php of theme.
<?php /** * Assign additional capabilities. * */ function custom_cap_48725() { $user = new WP_User( get_current_user_id() ); $user->add_cap( 'can_create_plugins' ); $user->add_cap( 'can_create_themes' ); } add_action( 'init', 'custom_cap_48725' );
- Go to
Users > Your profile
, checkAdditional Capabilities
section. You will see1, 1
#4
@
6 years ago
- Focuses ui administration added
- Keywords has-patch has-screenshots added
- Milestone changed from Awaiting Review to 5.3.1
- Severity changed from critical to normal
Great find @aravindajith! It appears this was introduced in [45926].
I've checked the patch, and it does resolve the issue. See the latest screenshot. I'm going to move this to the 5.3.1 milestone hoping it gets picked up.
Note: See
TracTickets for help on using
tickets.
Screenshot