WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#13032 closed defect (bug) (fixed)

Screen Options are per blog in 3.0

Reported by: ryan Owned by:
Milestone: 3.0 Priority: normal
Severity: blocker Version:
Component: Users Keywords: needs-patch
Focuses: Cc:

Description

In 3.0 meta box state is saved to usermeta keys of the form wp_trunk_closedpostboxes_dashboard and wp_trunk_meta-box-hidden_dashboard. In 2.9 these are closedpostboxes_dashboard and metaboxhidden_dashboard. This causes preference loss when upgrading to 3.0 and makes screen options per blog.

Change History (17)

#1 @ryan
6 years ago

Note the dashes are now present in meta-box-hidden.

#2 @ryan
6 years ago

closed-postboxes in admin-ajax.php switched from update_usermeta() to update_user_option() without adding the global flag.

#3 @ryan
6 years ago

(In [14112]) Make post box states a global user preference. see #13032

#4 @ryan
6 years ago

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

(In [14113]) Change meta-box-hidden to metaboxhidden to adjust for new key sanitization rules and maintain the same key name as 2.9. fixes #13032

#5 @wpmuguru
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Since the metabox options were saved in the options table during the beta 1, we should clear those out because they override the settings in the usermeta.

#6 @wpmuguru
6 years ago

(In [14212]) remove alpha-beta1 metabox preferences from options table, see #13032

#7 follow-up: @wpmuguru
6 years ago

(In [14213]) remove from usermeta table in r14212, see #13032

#8 in reply to: ↑ 7 ; follow-up: @jamescollins
6 years ago

Replying to wpmuguru:

(In [14213]) remove from usermeta table in r14212, see #13032

In a MySQL like query, the _ character is similar to the % character (except it matches any single character). Ref: http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#operator_like

A while ago in WPMU, a like query that used $wpdb->base_prefix caused lots of trouble (http://trac.mu.wordpress.org/ticket/727).

I think we're ok in this case, but I'm just wanting to make sure a similar problem doesn't exist here.

#9 @dd32
6 years ago

(In [14218]) Fix DB upgrade kickoff for removal of usermeta fields. See r14212, r14213, see #13032

#10 in reply to: ↑ 8 @nacin
6 years ago

Replying to jamescollins:

In a MySQL like query, the _ character is similar to the % character (except it matches any single character).

A while ago in WPMU, a like query that used $wpdb->base_prefix caused lots of trouble (http://trac.mu.wordpress.org/ticket/727).

Looks like wpmuguru caught that in #13099, [14215].

#11 @ryan
6 years ago

(In [14235]) Fix back compat for hidden columns and layout screen options. Change meta baox order to be per user, rather than per blog. This breaks back compat for box order but the previous behavior was wrong. see #13032

#12 @ryan
6 years ago

These other ones also need to be cleaned during upgrade.

#13 @scribu
6 years ago

Related: #13152

#14 @scribu
6 years ago

  • Keywords needs-patch added

Currently, metabox order is not respected on the post editing screen.

#15 @scribu
6 years ago

Also related: #12439

#16 @ryan
6 years ago

  • Severity changed from normal to blocker

Cleaning the bad options during upgrade should fix metabox order no being respected. Marking bad option removal as a blocker.

#17 @ryan
6 years ago

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

(In [14596]) Delete more bad screen options from usermeta. like_escape() blog prefix. fixes #13032

Note: See TracTickets for help on using tickets.