#23182 closed defect (bug) (fixed)
Offset error if the first item in an admin menu is a separator
| Reported by: | phill_brown | Owned by: | markjaquith |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Warnings/Notices | Version: | 2.7 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
There are a few ways you can get to this error, but the easiest way with the default install is:
add_action( 'admin_menu', create_function( '', 'unset( $GLOBALS[\'menu\'][2] );' ) );
I originally came across the error assigning the manage_sites capability to a non super admin role. If you do the same and visit /wp-admin/network/sites.php - you'll see the same error.
If this fix is approved, it raises another minor issue with the network page. There's now an unnecessary separator at the top of the menu. The second patch (network-menu) assigns the same capability requirement to the separator as the dashboard.
Attachments (3)
Change History (8)
#1
@
14 years ago
- Component Menus → Warnings/Notices
- Milestone Awaiting Review → 3.6
- Version trunk → 2.7
Confirmed the notice. The fix looks sane to me.
Refreshed as a single patch with proper file paths in 23182.patch.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Fixes offset error if separator is first in the admin menu