2

When adding an 'Association Rule' in CiviGroup Roles sync I get the error 'Undefined constant "rules"'- this is with Backdrop 1.28.2, CiviCRM 5.75.2 and PHP 8.1.29. The longer message is 'Undefined constant "rules" in civicrm_group_roles_add_rule_form_submit() (line 589 of /home/acivior2/public_html/modules/civicrm/backdrop/modules/civicrm_group_roles/civicrm_group_roles.module).' This is 100% reproducible. I can't test this on bmaster as it doesn't seem possible to access the Backdrop system settings & therefore CiviGroup settings are not available to me.

1 Answer 1

2

This looks like a typo in the code. I've moved this to an issue and linked a PR:

If you want to test locally, just change this (line 589 on the file indicated in the error you posted):

if (!empty(rules)) {

to this (adding the $):

if (!empty($rules)) {

2
  • Thanks, and yes that fixes the problem. I added comment to the issue
    – Andy Clark
    Commented Aug 11 at 15:28
  • The fix is merged & will be in 5.78.0
    – eileen
    Commented Aug 12 at 1:37

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.