Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#16348 closed defect (bug) (fixed)

Dashboard widget preferences not being honored

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

Description

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 16 years ago.
16348.patch (568 bytes ) - added by SergeyBiryukov 16 years ago.

Download all attachments as: .zip

Change History (10)

#1 @nacin
16 years ago

  • Milestone Awaiting Review3.1

#2 @ocean90
16 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 16 years ago by ocean90 (previous) (diff)

#3 @nacin
16 years ago

Oh man. Ryan's instincts trumped mine there.

#4 @kpdesign
16 years ago

  • Cc kparsell-wp@… added

#5 @markjaquith
16 years ago

Do we have something like this?

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

#6 @SergeyBiryukov
16 years ago

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

#7 @kpdesign
16 years ago

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

#8 @markjaquith
16 years ago

  • Resolutionfixed
  • Status newclosed

(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.