In my Backdropcms site, I have recently upgraded the Civicrm version from 5.78.3 to 6.5.0 (latest version).

Besides Civicrm I have other Civicrm related module in my site. These are the modules I have in the site installed - 

  1. CiviCRM Theme
  2. CiviMember Roles Sync
  3. CiviCRM Cron
  4. Webform CiviCRM Integration

and some other custom modules for custom functionality. 

I have followed this doc and upgraded the Civicrm. But After the upgrade when i cleared cache and re-enabled the modules, then I got this error and the site is now unreachable.

Error: Call to undefined function civicrm_initialize() in civicrm_member_roles_menu() (line 26 of /civicrm/backdrop/modules/civicrm_member_roles/civicrm_member_roles.module).
 

Anyone have any idea how can i solve this error? 

Comments

Hi Sudipto, this error usually means CiviCRM isn’t initializing properly before a dependent module (like CiviMember Roles Sync) tries to call its functions. After upgrading, verify that the CiviCRM module is fully enabled and that the civicrm.settings.php file path is still correct in your Backdrop configuration — upgrades sometimes reset or move it. Also, check that the CiviCRM core directory path in Settings → CiviCRM matches your current installation.

To fix temporarily, you can disable the CiviMember Roles Sync module via Drush or by renaming its folder, clear caches, ensure CiviCRM loads without error, and then re-enable the module. Once CiviCRM initializes first, the undefined function error should disappear.

Thanks Meaghan. I have solved this error. The issue was that after the upgrade, I re-enabled the civicrm related modules at a time that leads to the error. But after that I tried and re enabled the moduels one by one then I could solve this error.