Forums

Chronoforms WP conflict with Redirection plugin

ShoestringWebs 26 Feb, 2014
Upon activating Chronoforms WP, I received the following error:

Fatal error: Cannot redeclare pr() (previously declared in /home/verify/public_html/wp/wp-content/plugins/redirection/plugin.php:504) in /home/verify/public_html/wp/wp-content/plugins/chronoforms5/cegcore/gcloader.php on line 23


This is obviously a plugin conflict, but is it something that can be fixed easily? I rely heavily on the "Redirection" plugin, but REALLY want to use Chronoforms in my WP sites.
ShoestringWebs 28 Feb, 2014
Is this something that I can work around, without uninstalling the conflicting plugin?
Max_admin 02 Mar, 2014
Hi,

This is a small glitch, you may wrap the pr function in the file in the error in this code:


if(!function_exists("pr")){
...
}


Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
ShoestringWebs 11 Mar, 2014
Thanks, Max. There are two files mentioned in the error. Do I wrap the pr function in both?
Max_admin 11 Mar, 2014
Only the "gcloader.php" file is enough because I'm not sure about the importance of the same function in the WP plugin.

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
ShoestringWebs 11 Mar, 2014
Thank you very much, Max. I know enough PHP to be dangerous, so here's what I did:

if(!function_exists("pr")){
	
	function pr($array = array(), $return = false){
		if($return){
			return '<pre style="word-wrap:break-word; white-space:pre-wrap;">'.print_r($array, $return).'</pre>';
		}else{
			echo '<pre style="word-wrap:break-word; white-space:pre-wrap;">';
			print_r($array, $return);
			echo '</pre>';
		}
	}
}


I was able to activate Chronoforms; now checking to make sure that everything still works.
This topic is locked and no more replies can be posted.