Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#16348 closed defect (bug) (fixed)

Dashboard widget preferences not being honored

Reported by: kpdesign Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Network Admin Keywords: has-patch
Focuses: multisite Cc:


On my dev Multisite install, I have set my preferences to only show the "Right Now" widget on the Network Admin screen. However, whenever I go to the Network Admin dashboard, all of the widgets are being displayed, regardless of what I've chosen (see screenshot).

I have to check all of the boxes, then uncheck them to make the other widgets disappear. Navigating away from the dashboard, then returning, all of the widgets are once again showing, and the checkboxes next to each one in the screen options panel are empty.

This only happens on the Network Admin dashboard; individual site dashboards retain their preferences properly.

Attachments (2)

wp3.1-network-admin-dashboard-issue.png (130.2 KB) - added by kpdesign 9 years ago.
16348.patch (568 bytes) - added by SergeyBiryukov 9 years ago.

Download all attachments as: .zip

Change History (10)

#1 @nacin
9 years ago

  • Milestone changed from Awaiting Review to 3.1

#2 @ocean90
9 years ago

Related: #16238

It's happened:

Quote by ryan:

Let's make sure we don't end up with -network-network if the passed string is already suffixed.

get_hidden_meta_boxes( $screen )

$screen is dashboard-network and through convert_to_screen() it becomes dashboard-network-network.

Last edited 9 years ago by ocean90 (previous) (diff)

#3 @nacin
9 years ago

Oh man. Ryan's instincts trumped mine there.

#4 @kpdesign
9 years ago

  • Cc kparsell-wp@… added

#5 @markjaquith
9 years ago

Do we have something like this?

function add_suffix_once( $string, $suffix ) {
   return preg_replace( '#' . preg_quote( $suffix, '#' ) . '$#', '', $string ) . $suffix;

#6 @SergeyBiryukov
9 years ago

  • Keywords has-patch added; network-admin-dashboard removed

#7 @kpdesign
9 years ago

I've tested Sergey's patch on my dev install and it resolves the issue for me.

#8 @markjaquith
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [17356]) Make sure we don't double-add -user or -network suffixes in convert_to_screen(). props SergeyBiryukov. fixes #16348

Note: See TracTickets for help on using tickets.