1

Similar question

I've the same problem with new installation of CiviCRM in Backdrop on my own Debian 12 machine:

array_keys(): Argument #1 ($array) must be of type array, null given

when trying to set up a Association Rule for matching CiviCRM Group Administrators to Backdrop Role Administrator.

In the log nothing more IMO:

TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 586 of /var/www/html/backdrop/modules/civicrm/backdrop/modules/civicrm_group_roles/civicrm_group_roles.module).

Backdrop CMS: 1.26.2 PHP Version: 8.2.7 CiviCRM: 5.67.3

1 Answer 1

1

Regression from recent changes in https://github.com/civicrm/civicrm-backdrop/pull/150

Fix: https://github.com/civicrm/civicrm-backdrop/pull/169/files

Patch: https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-backdrop/pull/169.patch

4
  • I tried to change that line manually but now the error is: "max(): Argument #1 ($value) must contain at least one element" and in the log: "ValueError: max(): Argument #1 ($value) must contain at least one element in max() (line 586 of /var/www/html/backdrop/modules/civicrm/backdrop/modules/civicrm_group_roles/civicrm_group_roles.module)."
    – Steve
    Dec 4, 2023 at 8:57
  • I have updated my answer Dec 4, 2023 at 9:15
  • thanks but having patched the file I still get the same error registering new user to Backdrop: _civicrm_group_roles_validate_groups(): Argument #1 ($group_ids) must be of type array, null given, called in /var/www/html/backdrop/modules/civicrm/backdrop/modules/civicrm_group_roles/civicrm_group_roles.module on line 108
    – Steve
    Dec 6, 2023 at 5:50
  • And when trying the association: Undefined constant "rules" And I don't get it. If this patch has been there for almost a year, why it haven't made it to the current archive?
    – Steve
    Dec 6, 2023 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.