Title: Critical Error when access Allowed Groups admin tab
Last modified: February 9, 2025

---

# Critical Error when access Allowed Groups admin tab

 *  Resolved [AWOL](https://wordpress.org/support/users/awol/)
 * (@awol)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/critical-error-when-access-allowed-groups-admin-tab/)
 * I just installed this plugin, but when I go to the Allowed Groups tab in admin,
   in the first column of the table it shows this, with nothing else in the table
   except the first header row:
 * “There has been a critical error on this website. Please check your site admin
   email inbox for instructions. If you continue to have problems, please try the
   [support forums](https://wordpress.org/support/forums/).
 * [Learn more about troubleshooting WordPress.](https://wordpress.org/documentation/article/faq-troubleshooting/)“
 * The error in the email that arrives is this: An error of type E_ERROR was caused
   in line 33 of the file /wp-content/plugins/buddypress-groups-extras/views/admin/
   groups_list.php. Error message: Uncaught TypeError: in_array(): Argument #2 (
   $haystack) must be of type array, null given in /wp-content/plugins/buddypress-
   groups-extras/views/admin/groups_list.php:33
 * Having looked at that line, it seems that `<?php echo ( ( $bpge['groups'] ==='
   all' || in_array( $group_id, $bpge['groups'], true ) ) ?` is the problem. I don’t
   know where `$bpge['groups']` is defined, but presumably in another file which
   is probably bpge.php.
 * I tried commenting out `|| in_array( $group_id, $bpge['groups'], true )` which
   gets rid of the error but the groups are not listed, and there is just the header
   row. My site has 7 groups by the way. Hopefully there is a simple solution to
   this.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Slava Abakumov](https://wordpress.org/support/users/slaffik/)
 * (@slaffik)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/critical-error-when-access-allowed-groups-admin-tab/#post-18304337)
 * Hello there,
 * This is the first report about the critical error.
 * It looks like your `$bpge['groups']` is NOT `all` and is not an array.
 * I think you can fix it by going to the plugin admin area, its Groups page. Check
   1 group, and then check all of them (so it’s applicable to `all`), and save the
   settings. That should overwrite the setting in the database and should fix your
   issue.
 *  Thread Starter [AWOL](https://wordpress.org/support/users/awol/)
 * (@awol)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/critical-error-when-access-allowed-groups-admin-tab/#post-18307420)
 * Thanks for the reply but I have uninstalled the plugin because I needed a quicker
   response from you; I have now coded something myself to achieve what I wanted.
   I may come back to your plugin at a later date, but I don’t want to implement
   this on all groups anyway, and it was not possible to select one group or some
   groups, as the individual checkboxes weren’t visible (that is where the error
   was appearing), so I’m not sure your suggested solution is one that suits. If
   I reinstall the plugin I will try to tick the only box visible, which I assume
   is a ‘Select All’ checkbox, but that is unlikely at the moment, especially as
   it also requires installing BP Classic, and I am trying to reduce the number 
   of plugins on my site.
 *  Plugin Author [Slava Abakumov](https://wordpress.org/support/users/slaffik/)
 * (@slaffik)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/critical-error-when-access-allowed-groups-admin-tab/#post-18307678)
 * I understand, thanks for the update.
 * I do have in plans to ditch the requirement of the BP Classic, not sure when 
   though.
 *  [tolashitta](https://wordpress.org/support/users/tolashitta/)
 * (@tolashitta)
 * [1 year ago](https://wordpress.org/support/topic/critical-error-when-access-allowed-groups-admin-tab/#post-18489581)
 * Hi [@awol](https://wordpress.org/support/users/awol/),@slaffik 
   I’m currently
   having same issue you had with the buddypress-groups-extras plugin.
 * Please can you give direction on how you solve the issue of adding extra field
   to your group page.
   Thanks
 *  Thread Starter [AWOL](https://wordpress.org/support/users/awol/)
 * (@awol)
 * [8 months, 3 weeks ago](https://wordpress.org/support/topic/critical-error-when-access-allowed-groups-admin-tab/#post-18649920)
 * Hi [@tolashitta](https://wordpress.org/support/users/tolashitta/), sorry I didn’t
   respond earlier – I wasn’t alerted so didn’t know you had asked a question. I
   have moved away from Buddypress completely now, there were too many issues like
   this one with everything I wanted to achieve, and I have (with the help of AI)
   coded my own now. I hope you have found a solution.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Critical Error when access Allowed Groups admin tab’ is closed to new
replies.

 * ![](https://ps.w.org/buddypress-groups-extras/assets/icon-256x256.png?rev=1390284)
 * [BuddyPress Groups Extras](https://wordpress.org/plugins/buddypress-groups-extras/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/buddypress-groups-extras/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/buddypress-groups-extras/)
 * [Active Topics](https://wordpress.org/support/plugin/buddypress-groups-extras/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddypress-groups-extras/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddypress-groups-extras/reviews/)

 * 5 replies
 * 5 participants
 * Last reply from: [AWOL](https://wordpress.org/support/users/awol/)
 * Last activity: [8 months, 3 weeks ago](https://wordpress.org/support/topic/critical-error-when-access-allowed-groups-admin-tab/#post-18649920)
 * Status: resolved