WordPress.org

Ready to get started?Download WordPress

Forums

Magento WordPress Integration
[resolved] BuddyPress seems to kill the layout (3 posts)

  1. jeremyBass
    Member
    Posted 1 year ago #

    Hello,
    I can't seem to get any thing to show when I use the
    PHP Fatal error: Call to a member function getLayout() on a non-object in /var/www/html/blog/wp-content/plugins/magento-wordpress-integration/mwi.php on line 29

    while looking at any page that is for BuddyPress. So the theme is BuddyPress Default and it works for post and everything, but when i go to use the pages for BuddyPress it's self it fails. It does not work on the pages for BuddyPress but works on the other pages just fine.

    I'm hoping to clear this up so i can then use the Single Sign-on for Magento and WordPress.

    http://wordpress.org/extend/plugins/magento-wordpress-integration/

  2. jeremyBass
    Member
    Posted 1 year ago #

    so trying to work this out.. it seems that

    $app = Mage::app(self::getValue('websitecode','base'), 'website');

    on line 53 of the mwi.php so .. i got it.. what it took was to make sure the Mage was loaded.. that was the cause..

    I changed

    public function getApp() {
    	  	if(class_exists( 'Mage' ) && !is_admin()) {
    	  		$app = Mage::app(self::getValue('websitecode','base'), 'website');
    	  		return $app;
    	  	}
      	}

    to

    public function getApp() {
    		$magepath = self::getValue('magepath');
    		require_once($magepath);
    		umask(0);
    	  	if(class_exists( 'Mage' ) && !is_admin()) {
    	  		$app = Mage::app(self::getValue('websitecode','base'), 'website');
    	  		return $app;
    	  	}
      	}

    and everything is now working.. simple change.

  3. jamesckemp
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Jeremy,

    Thanks for the update - there must be something in BuddyPress that stops mage.php from loading. I'll see if I can find what it is.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic