Support Forum

Fatal Error – Conflict with the Event Calendar plugin

ST strengthsensei
strengthsensei
Member

Hello, 

I have just placed the simple-press folder in my plugins directory and get this error when I try and activate it.

 

Plugin could not be activated because it triggered a fatal error.

Fatal error: Cannot redeclare sp_get_option() (previously declared in /nas/wp/www/cluster-41077/powerexe/wp-content/plugins/the-events-calendar/src/functions/template-tags/deprecated.php:484) in /nas/wp/www/cluster-41077/powerexe/wp-content/plugins/simple-press/sp-api/sp-api-primitives.php on line 95

Unfortunately the events calendar is a plugin I need to be active. I am wondering if there is a solution so both plugins can live together happily.

Thank you for you help in advance!

4 Answers

New Answer

IK Ike
Ike
Member

Hey Charles,

This is because the Events Calendar plugin uses ‘sp’ as a prefix for it’s get_option function. WordPress guidelines have you prefix any PHP functions with something unique, in our case we use ‘sp’ for Simple:Press. We have no idea why Events Calendar uses ‘sp’ as it’s prefix for this function but it does cause a clash as each function must have a unique name, and it’s something we thought they’d actually changed a long time ago.

Do you have the latest version of their plugin? If so, it might be worth asking them directly for a solution.

ST strengthsensei
strengthsensei
Member

Thank you Ike for the fast response! Yes everything is up to date in my plugins.

I will check in with them.

Thank you again!

ST strengthsensei
strengthsensei
Member

Thank you! You are right, they did solve this. 

 

I had to add this line to my wordpress wp-config.php file

define(‘TRIBE_DISABLE_DEPRECATED_TAGS’, true);

Thank you again! Sorry I should have searched their forum for this as I am sure someone else would have had this issue.