WordPress.org

Support

Support » Plugins and Hacks » Magento WordPress Integration » [Resolved] BuddyPress seems to kill the layout

[Resolved] BuddyPress seems to kill the layout

  • jeremyBass

    @jeremybass

    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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • jeremyBass

    @jeremybass

    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.

    Plugin Author jamesckemp

    @jamesckemp

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] BuddyPress seems to kill the layout’ is closed to new replies.
Skip to toolbar