Title: Undefined array key &#8220;active&#8221;, Undefined variable $remove_menu_admin_table
Last modified: January 1, 2025

---

# Undefined array key “active”, Undefined variable $remove_menu_admin_table

 *  [Dashify](https://wordpress.org/support/users/dashify/)
 * (@dashify)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-active-undefined-variable-remove_menu_admin_table/)
 * I’m trying to remove the Home submenu item under WooCommerce (though this happens
   for any menu item I try to remove), but after saving, it doesn’t get removed 
   and shows this error:
 * `Warning: Undefined array key "active" in /var/www/html/wp-content/plugins/remove-
   admin-menus-by-role/remove-admin-menus-by-role.php on line 285 Warning: Undefined
   variable $remove_menu_admin_table in /var/www/html/wp-content/plugins/remove-
   admin-menus-by-role/remove-admin-menus-by-role.php on line 291`
 * When I first installed the plugin, I accidentally saved without having any role
   selected, so perhaps this caused it?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Dashify](https://wordpress.org/support/users/dashify/)
 * (@dashify)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-active-undefined-variable-remove_menu_admin_table/#post-18221792)
 * I found out that it wasn’t being hidden because I was an Administrator.
 * However, it still shows that warning.

Viewing 1 replies (of 1 total)

The topic ‘Undefined array key “active”, Undefined variable $remove_menu_admin_table’
is closed to new replies.

 * ![](https://ps.w.org/remove-admin-menus-by-role/assets/icon-128x128.png?rev=1351557)
 * [Remove admin menus by role](https://wordpress.org/plugins/remove-admin-menus-by-role/)
 * [Support Threads](https://wordpress.org/support/plugin/remove-admin-menus-by-role/)
 * [Active Topics](https://wordpress.org/support/plugin/remove-admin-menus-by-role/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/remove-admin-menus-by-role/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/remove-admin-menus-by-role/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Dashify](https://wordpress.org/support/users/dashify/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-active-undefined-variable-remove_menu_admin_table/#post-18221792)
 * Status: not resolved