Support » Plugin: Audit Trail » Fatal Errors with 3.2.1 Multisite and Skitter Slider …

  • Resolved chuckingit

    (@chuckingit)


    fyi – just upgraded WP multisite network to version 3.2.1 and got the following fatal errors below when trying to activate Audit Trail 1.9 after having just activated WP Skitter Slider 1.3 ..

    error message =

    Fatal error: Cannot redeclare pr() (previously declared in /home/site-name/public_html/wp-content/plugins/audit-trail/plugin.php:574) in /home/site-name/public_html/wp-content/plugins/wp-skitter-slideshow/wp-skitter-slideshow.php on line 266

    ugh … any help certainly appreciated … cordially, chuck scott

Viewing 1 replies (of 1 total)
  • Thread Starter chuckingit

    (@chuckingit)

    below is thread i just posted in the WP Skitter Slider forum thus including here since this impacts both plugins …

    ===
    Okay – answering my own post here … turns out that both Audit Trail and WP Skitter Slider are using similar debug function that appears to be suggested from CakePHP (info below) …

    since i am not using Audit Trail’s debug feature, i commented those lines out and that seemed to work and now both plugins co-exist …

    it does remind me about some of the threads at Justin Tadlock’s ThemeHybrid site that suggest importance of plugin authors to define their functions by pre-appending said functions with unique plugin text … e.g., had Audit Trail author defined his pr function as audit_pr and Skitter used skitter_pr to define his, then the likelyhood of conflict would be greatly decreased but i digress …

    cordially, chuck scott

    ======================
    Info on Work Out
    ======================

    1. code from skitter that PHP complained as fatal error circa lines 258 thru 266 =

    /**
     * Debug arrays and others
     */
    function pr ($array)
    {
    	echo '<pre>';
    	print_r($array);
    	echo '</pre>';
    }

    2. code from Audit Trail that php complained about circa lines 574 thru 582 (note i commented out the function) =

    /**
     * Debug helper, borrowed from CakePHP, that displays a print_r inside <pre></pre> tags
     *
     * @param string $name Name of your plugin.  Is used to determine the plugin locale domain
     * @param string $base Directory containing the plugin's 'view' files.
     * @return void
     **/
    
    /*
    if ( !function_exists( 'pr' ) ) {
    	function pr( $thing ) {
    		echo '<pre>';
    		print_r( $thing );
    		echo '</pre>';
    	}
    }
    */

    – fin –

Viewing 1 replies (of 1 total)
  • The topic ‘Fatal Errors with 3.2.1 Multisite and Skitter Slider …’ is closed to new replies.