Admin Sidebar Menu Won't Stay Expanded
The issue discussed in this old one:
and this less old one:
just had me tearing hair out for a cool minute.
To summarize: I accidentally hit the little “< Collapse Menu” button, which shrinks the sidebar to icons-only view. So I intentionally clicked it a second time to make it expand. But on the next page I clicked away to, it went ahead and collapsed itself, then from that point on it would refuse to stay expanded.
Logged into the site in another browser–> same behavior. Drat!
Created a new admin user just to check–> when logged into that user, the sidebar behaved as expected. I clicked the button to expand/collapse it several times, navigate to different pages, all worked as it supposed to.
Logged back into the other (main) admin, and issue was still there. I tried monkeying with that user a bit, changing the password, changing it’s role… nothing help, it’s like that user was cursed to to have a collapsed menu forever.
So I took the path of least resistance: logged into the new admin, deleted the affected user (attributing all the posts to this new user), then recreated it, using the same email, password and username.
Now when I log into this recreated user, all is well. I could even click the little button and it would do what it’s supposed to. All’s well; it’s just 20 minutes or so that I can’t get back. Oh well.
Just thought I’d share my resolution in case someone else is going hairless out there fighting with their sidebar menu that won’t stay open.
OK spoke too soon.
I remembered I need to delete the temporary and attribute all the posts back to the original user. When I did that, I went to check the little button’s behavior again, and the issue came back.
So I did all the standard troubleshooting this time around: deactivate all plugins, go back to Twenty Eleven, reset the plugin folder via FTP. No dice.
Is there maybe some functions.php code someone has that’ll just remove that “< Collapse menu” button entirely? Scoff if you will, I always like the sidebar open and can’t think of a single scenario where I would want it collapsed.
I’m more of “Icons and Titles” kind of guy, rather than a “Icons Only” one.
Did you ever find a solution for this. The self collapsing menu is driving me buggy.
Sorry ozcsys, I did not. After re-deleting/attributing/re-building the user a second time, I didn’t want to play anymore and simply vowed to be careful never to hit the button again.
But thank you for letting me know I am not the only driven completely batty by that behavior.
Still waiting for that beautiful soul who will drop some solid functions.php code into this forum.
Hi, I’ve accidentally found the trick for the collapse admin menu issue, no re-installation, no cache clearing needed, nothing concern with plugin, it’s the setting in WP database.
1) Log in to phpmyadmin, click on the database.
2) Browse the table “wp_usermeta” (if you have database prefixed, the table name is ‘usermeta’ followed by the prefix).
3) Look for the ‘wp_user-settings‘ from the column ‘meta_key‘ (make sure the user_id is correct).
4) Change the ‘meta_value’ to ‘mfold=o‘, save your record, and login again.
@limbe Thanks for your answer. In my case it works. But instead of a “o” it is a 0(zero) mfold=0. Thanks
I was going crazy!!!Limbe… Thank you!!! So much!
Worked form me with o (letter) e not with 0 (zero).
Thank you!!!!!!! THANK YOU!!!
4) Change the ‘meta_value’ to ‘mfold=o’, save your record, and login again.
paste this snippet into your address bar and hit enter:
that should provide immediate relief, and results in the same meta_value getting mfold=0 in the database. it’s no more permanent though so if you click the collapse button again you’ll have to reapply.
for a more permanent solution i replaced the lines in wp-admin/js/common.js(.min.js) containing:
The mfold=0 fix worked for me, but if I re-collapse the menu manually in WP admin, it stays closed and the only way to fix is to re-edit the database again. Eck.
The solution from Humbletim worked for me, good call. Quick and easy.
For me dont work.. http://www.andersonnarciso.com/prints/bugadminmenu.png
- The topic ‘Admin Sidebar Menu Won't Stay Expanded’ is closed to new replies.