• Resolved Martin

    (@rastarr)


    Got this fatal error on installing this latest version:

    Fatal error: Cannot redeclare class CallbackBody in /home/xxxxx/public_html/xxxxx/wp-content/plugins/wp-external-links/includes/phpQuery.php on line 1038

    The plugin looks fantastic so I’d love to be able to use it to set up another site for Guest Post blogging.

    http://wordpress.org/extend/plugins/advanced-access-manager/

Viewing 9 replies - 1 through 9 (of 9 total)
  • vasyl_m

    (@vasyl_m)

    Hi Rastarr,
    Sounds like the author of WP External Links didn’t realize that somebody else can user phpQuery lib. Actually phpQuery is fantastic product. I love it.
    Ok. So to fix that u have manually modify WP External Links plugin because AAM does not cause this problem (I implemented check for existing class long time ago).
    Find a place where in WP External Links the author include phpQuery.php and wrap it in if statement :
    if (!class_exists(‘phpQuery’)){
    require …
    }
    Also contact the author of this plugin and notify him that he is a bad boy 🙂 (I kidding)

    Regards,
    Vasyl

    Thread Starter Martin

    (@rastarr)

    Contacted author as noted. Seems it killed another guy’s site too 🙂

    Thread Starter Martin

    (@rastarr)

    And thanks heaps for the uber-fast reply too and with a fix.

    vasyl_m

    (@vasyl_m)

    Yeap, looks like 🙂

    Regards,
    Vasyl

    Thread Starter Martin

    (@rastarr)

    well, I found this:

    /**
    	 * wp callback
    	 */
    	public function call_wp() {
    		if ( ! is_admin() && ! is_feed() ) {
    			// Include phpQuery
    			require_once( 'phpQuery.php' );
    
    			// add wp_head for setting js vars and css style
    			add_action( 'wp_head', array( $this, 'call_wp_head' ) );

    Do you think this is what I should be changing? Not that I know what I’m doing with PHP 🙂

    vasyl_m

    (@vasyl_m)

    Rastarr,
    Yeap. Just wrap:
    // Include phpQuery
    require_once( ‘phpQuery.php’ );

    in if statement specified about.

    Regards,
    Vasyl

    Thread Starter Martin

    (@rastarr)

    Way cool Vasyl.
    That worked a treat.

    Pi Zi

    (@freelancephp)

    Thanks Rastarr for reporting, and thanks Vasyl for the fix.

    Hi freelancephp,
    Appreciate your quick fix.

    Regards,
    Vasyl

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: Advanced Access Manager] Ouch – killed my testing site’ is closed to new replies.