• Hi,

    When I update to v1.0.3 from v1.0.2, my custom menus on the left hand side of the backend crashed.
    Can you please help me resolve this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Did you mean version 1.10.3?

    I’m not sure what it means for custom menus to “crash”. Could you please describe the problem in more detail?

    Thread Starter atomicbong

    (@atomicbong)

    Hi,

    Yes, sorry, I meant v1.10.3

    I am using an admin theme in the backend.
    The only plugin I updated was admin menu editor to v1.10.3
    Please see the before and after screenshot.

    https://prnt.sc/PfkbkCtvj1D2

    Plugin Author Janis Elsts

    (@whiteshadow)

    The latest update included a patch that fixed a conflict with another admin theme. I wonder if this could be related.

    You could test this by manually undoing the patch. Fortunately, it’s just a one-line change (but it might be a good idea to make a backup first anyway). Open the file /admin-menu-editor/includes/menu-editor-core.php and find line #704. It should look like this in version 1.10.3:

    add_filter('parent_file', array($this, 'replace_wp_menu'), 1001);

    Try removing the priority number from the filter:

    add_filter('parent_file', array($this, 'replace_wp_menu'));

    Since the change was necessary to fix another conflict, it’s unlikely to be reverted. The number has to be greater than 999. But maybe there’s some number other than 1001 that would work.

    Thread Starter atomicbong

    (@atomicbong)

    Hi,

    Making this change fixes it for me.
    Is there anyway to have a permanent fix?

    Else every time I update the plugin the menus would break.

    Thanks,

    Plugin Author Janis Elsts

    (@whiteshadow)

    I’m not sure if there’s a way to permanently fix it in AME without once again breaking the thing that this change was introduced to fix. Maybe it could be fixed in the admin theme? Which admin theme are you using?

    Thread Starter atomicbong

    (@atomicbong)

    I am using admin2020 by UIpress.

    Plugin Author Janis Elsts

    (@whiteshadow)

    The only potentially relevant line I found in UiPress 2.4.0 is in uipress/admin/apps/menu-creator, line #46:

    add_action("parent_file", [$this, "capture_wp_menu"], 999);

    Maybe you could try changing the priority like this:

    add_action("parent_file", [$this, "capture_wp_menu"], 1010);

    (The exact number is not that important in this case, it just needs to be higher than the number used by AME.)

    Thread Starter atomicbong

    (@atomicbong)

    Hi,

    This worked for me.
    Thank you for your help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Latest update upsets the menu alignment’ is closed to new replies.