WordPress.org

Ready to get started?Download WordPress

Forums

admin-navigation
Admin Sidebar Menu Won't Stay Expanded (12 posts)

  1. portlandian
    Member
    Posted 1 year ago #

    The issue discussed in this old one:

    http://wordpress.org/support/topic/dashboard-menu-wont-stay-open?replies=4

    and this less old one:

    http://wordpress.org/support/topic/admin-navigation-bar-collapseexpand?replies=20

    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.

    http://wordpress.org/extend/plugins/admin-navigation/

  2. portlandian
    Member
    Posted 1 year ago #

    UPDATE:

    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.

  3. ozcsys
    Member
    Posted 1 year ago #

    Did you ever find a solution for this. The self collapsing menu is driving me buggy.

  4. portlandian
    Member
    Posted 1 year ago #

    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.

  5. limbe
    Member
    Posted 1 year ago #

    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.

  6. Pedro
    Member
    Posted 1 year ago #

    @limbe Thanks for your answer. In my case it works. But instead of a "o" it is a 0(zero) mfold=0. Thanks

  7. frankypa
    Member
    Posted 1 year ago #

    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.

  8. timbunch
    Member
    Posted 1 year ago #

    Thank you! mfold=0 worked!

  9. humbletim
    Member
    Posted 1 year ago #

    QUICK FIX:

    paste this snippet into your address bar and hit enter:
    javascript:setUserSetting("mfold","0");location.reload();

    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:
    deleteUserSetting("mfold");
    with:
    setUserSetting("mfold","0");

  10. mattcass
    Member
    Posted 1 year ago #

    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.

  11. dj maskell
    Member
    Posted 1 year ago #

    The solution from Humbletim worked for me, good call. Quick and easy.

    Side note, Firefox does not allow JS to run from the url bar by default. The workaround is using the javascript console command editor in firebug or using another browser.

  12. andersonnarciso
    Member
    Posted 10 months ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic