WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Access Manager
[resolved] Ouch - killed my testing site (10 posts)

  1. Martin
    Member
    Posted 1 year ago #

    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/

  2. WP AAM
    Member
    Plugin Author

    Posted 1 year ago #

    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

  3. Martin
    Member
    Posted 1 year ago #

    Contacted author as noted. Seems it killed another guy's site too :)

  4. Martin
    Member
    Posted 1 year ago #

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

  5. WP AAM
    Member
    Plugin Author

    Posted 1 year ago #

    Yeap, looks like :)

    Regards,
    Vasyl

  6. Martin
    Member
    Posted 1 year ago #

    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 :)

  7. WP AAM
    Member
    Plugin Author

    Posted 1 year ago #

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

    in if statement specified about.

    Regards,
    Vasyl

  8. Martin
    Member
    Posted 1 year ago #

    Way cool Vasyl.
    That worked a treat.

  9. freelancephp
    Member
    Posted 1 year ago #

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

  10. WP AAM
    Member
    Plugin Author

    Posted 1 year ago #

    Hi freelancephp,
    Appreciate your quick fix.

    Regards,
    Vasyl

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic