• Resolved AWOL

    (@awol)


    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.

    Learn more about troubleshooting WordPress.

    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 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Slava Abakumov

    (@slaffik)

    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

    (@awol)

    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

    (@slaffik)

    I understand, thanks for the update.

    I do have in plans to ditch the requirement of the BP Classic, not sure when though.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.