WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 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)

comment:1 @ryan5 years ago

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

comment:2 @ryan5 years ago

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

comment:3 @ryan5 years ago

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

comment:4 @ryan5 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

comment:5 @wpmuguru5 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.

comment:6 @wpmuguru5 years ago

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

comment:7 follow-up: @wpmuguru5 years ago

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

comment:8 in reply to: ↑ 7 ; follow-up: @jamescollins5 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.

comment:9 @dd325 years ago

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

comment:10 in reply to: ↑ 8 @nacin5 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].

comment:11 @ryan5 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

comment:12 @ryan5 years ago

These other ones also need to be cleaned during upgrade.

comment:13 @scribu5 years ago

Related: #13152

comment:14 @scribu5 years ago

  • Keywords needs-patch added

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

comment:15 @scribu5 years ago

Also related: #12439

comment:16 @ryan5 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.

comment:17 @ryan5 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.