• I am seeing this line in my php.error.log for multiple websites that are using your plugin. Every time a user logs in to WordPress, it’s generating approximately 160 lines in the log that all say this:

    Undefined array key 2 in /home/xxxxxx/public_html/wp-content/plugins/advanced-access-manager/application/Core/Object/Menu.php on line 136

    Is it possible to put the code in a conditional, or otherwise make a change that doesn’t result in so many warnings being logged?

    I’m glad to provide more information if it would be helpful. Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author AAM Plugin

    (@vasyltech)

    Thank you @matt6303 for the feedback.

    The issue you described is caused due corrupted global variable $submenu and this is not a bug. It is most likely that you have some plugin or theme that corrupts it and I would recommend finding the one that does it because it probably causes some other side effects on your website that you may not be aware of.

    Meantime we will update AAM to better work with corrupted submenu data to avoid rendering these notifications.

    Thank you.

    Hi, I’m also seeing errors generated in the log file – is this the same issue?

    /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 214
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 328
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 332
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 332
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 332
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 332
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 332
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 332
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 332
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 332
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 332
    [06-Dec-2023 13:11:40 UTC] PHP Notice: Undefined offset: 2 in /wp-content/plugins/advanced-access-manager/application/Service/AdminMenu.php on line 241

    Thanks

    Plugin Author AAM Plugin

    (@vasyltech)

    Thank you @brian_milnes,

    We’ve adjusted AAM functionality to work with corrupted menu data and this will be released in upcoming AAM 6.9.19 version.

    However, I must warn you as well that there is some plugin or theme on your website that corrupts WordPress core submenu variable and that may affect other features on your website beyond AAM.

    Regards.

    Thanks!

    Thread Starter Matt Scheidler

    (@matt6303)

    Original poster here. Thank you for the update.

    In my troubleshooting, it appears as though these log entries only happen when an non-Administrator role logs in. When I log in as an admin it doesn’t happen, but when my clients log in as Editor it does.

    It’s not happening on all my AAM sites. Most of the ones where it is happening are 5-8 year old sites, and possibly there is some common denominator, though I haven’t found it. But one of the sites with the issue was just launched a few months ago, and doesn’t have all that much in common with the sites I was building years ago.

    For now, I’m happy for your upcoming adjustment. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Undefined array key 2 in menu.php’ is closed to new replies.