Opened 9 years ago
Last modified 6 years ago
#32655 new defect (bug)
Don't save screen options (table column) in post edit page and maybe other pages
Reported by: | Juriy | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.1 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
I fixed it so...
wp-includes/user.php
row 364
if ( $user->has_prop( $option ) ) $result = $user->get( $option ); elseif ( $user->has_prop( $prefix . $option ) ) $result = $user->get( $prefix . $option ); else $result = false; ---- //todo bag user options delete this // if ( $user->has_prop( $prefix . $option ) ) // Blog specific // $result = $user->get( $prefix . $option ); // elseif ( $user->has_prop( $option ) ) // User specific and cross-blog // $result = $user->get( $option ); // else // $result = false;
Change History (4)
#1
@
9 years ago
- Component changed from Users to Administration
- Type changed from defect (bug) to feature request
#2
@
9 years ago
My English is not very good, sorry.
I'll try to describe in more detaily.
I mean when I choose columns to be displayed in the menu options (page edit posts) but those changes are not saved. After refreshing the page options are set as default. As I understood WP function 'get_user_option returns wp_<options name> to me and in the moment the columns choosen by me in order to hide are saved in <options name> without the prefix wp_. in the table WP_User_meta. I have corrected the function as described above would it be right?
#3
@
9 years ago
- Type changed from feature request to defect (bug)
Ah my mistake.
Checking the non-prefixed option, like you're suggesting, isn't correct, and the way Core is currently doing it looks right to me.
First it checks if a prefixed item is set, and uses that if it is, if not, it then looks for a non-prefixed one and uses that.
The prefix is for Multisite & Shared user tables. Do you have a blank/empty wp_<option>
set incorrectly which is overriding it?
If I understand correctly, you want the screen options to revert to defaults every time the current cookie is lost?
To me, that doesn't seem like a very good user experience, and it should show what the user had selected previously.