after an update of wp civicrm plugin from 5.16.4 to 5.30.1. (WordPress is also up to date). When I subscribe to an event this fatal error appear : PHP message: PHP Fatal error: Uncaught Error: Class 'CRM_Event_Cart_BAO_Conference' not found in civicrm/CRM/Event/BAO/Event.php:1133

File : "civicrm/CRM/Event/BAO/Event.php:1133"

$sessions = CRM_Event_Cart_BAO_Conference::get_participant_sessions($participantId);

Maybe the problem is due to a wrong setting ? I kept my old civicrm.settings.php as it is after update.

It seems eventcart extension is not installed or activated. I mean this extension : wp-content/plugins/civicrm/civicrm/ext/eventcart/

Do you know how install/enable it?

Thank you for you help. Nicolas

  • Just a thought - there are other approaches available to paying for multiple events, especially if those events are part of a Series for example - just in case there is a better solution now than event cart
    – petednz - fuzion
    Nov 5 '20 at 20:35

As of this writing event cart should be enabled but hidden, and currently still relies on the setting under Administer - CiviEvent - Component Settings to switch on and off features. You can verify if the extension is enabled by running this SQL: select is_active from civicrm_extension where name='eventcart';

If it's not, in civi go to Support - Developer - api explorer v3 and choose Entity=Extension, and Action=Enable, and for the key parameter put eventcart. Then click execute at the bottom. The upgrade should have done that though. There should be a record that it did that in ConfigAndLog.

  • There is only one extension is this table (it's my custom payment extension). Nothing else. Same result in api explorer v3.
    – Nicolas
    Nov 5 '20 at 22:29
  • Maybe can help : I can see all files of eventcart in the directory. So, I think it's installed but not enabled. Other info, it seems there are 2 different directories for extensions : in plugin core : wp-content/plugins/civicrm/civicrm/ext/ and in upload dir : wp-content/uploads/civicrm/ In 1st one, there is eventcart extension and others. In the second one, I have my custom payment extension.
    – Nicolas
    Nov 6 '20 at 9:25

I found the solution. The reason was very simple. In my settings file located in WordPress upload files, I set : $civicrm_root = dirname(__FILE__).'/../../plugins/civicrm/civicrm/';

I change it into absolute real path : $civicrm_root = /var/www/html/mysite/html/wp-content/plugins/civicrm/civicrm/';

After that, I was able to enable the extension "eventcart" with api explorer v3. It seems the "../" is not allowed by civi in last version.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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