facebookarchive / facebook-for-magento

A first-party extension plugin built for Magento. This plugin will install a pixel on your site, upload your products into a catalog for use in FB ads, and (optionally) auto-create an FB shop with your products.
https://www.facebook.com/business/help/532749253576163
84 stars 57 forks source link

Fatal exception when loading configuration #86

Closed kunzi closed 6 years ago

kunzi commented 6 years ago

I installed the extension via Magento Connect, but I receive this error:

Notice: Undefined property: FBProductFeedSamples::$stock in /public_html/app/code/community/Facebook/AdsExtension/Model/FBProductFeed.php on line 190 : #0 /public_html/app/code/community/Facebook/AdsExtension/Model/FBProductFeed.php(190): mageCoreErrorHandler(8, 'Undefined prope...', '', 190, Array) #1 /public_html/app/code/community/Facebook/AdsExtension/Model/FBProductFeedSamples.php(102): FBProductFeed->buildProductEntry(Object(MageWorx_Downloads_Model_Catalog_Product), 'FRACTION 140 VU...') #2 /public_html/app/code/community/Facebook/AdsExtension/Model/Observer.php(193): FBProductFeedSamples->generate() #3 /public_html/app/code/community/Facebook/AdsExtension/Block/Adminhtml/Diaindex.php(122): Facebook_AdsExtension_Model_Observer->generateFacebookProductSamples() #4 /public_html/app/design/adminhtml/default/default/template/facebook_ads_extension/fae_index.phtml(91): Facebook_AdsExtension_Block_Adminhtml_Diaindex->fetchFeedSamples() #5 /public_html/app/code/core/Mage/Core/Block/Template.php(241): include('') #6 /public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...') #7 /public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView() #8 /public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml() #9 /public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml() #10 /public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml() #11 /public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml() #12 /public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml() #13 /public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true) #14 /public_html/app/design/adminhtml/default/default/template/page.phtml(74): Mage_Core_Block_Abstract->getChildHtml('content') #15 /public_html/app/code/core/Mage/Core/Block/Template.php(241): include('') #16 /public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...') #17 /public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView() #18 /public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml() #19 /public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml() #20 /public_html/app/code/local/Inchoo/PHP7/Model/Layout.php(15): Mage_Core_Block_Abstract->toHtml() #21 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Inchoo_PHP7_Model_Layout->getOutput() #22 /public_html/app/code/community/Facebook/AdsExtension/controllers/Adminhtml/FbmainController.php(27): Mage_Core_Controller_Varien_Action->renderLayout() #23 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Facebook_AdsExtension_Adminhtml_FbmainController->indexAction() #24 /public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index') #25 /public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #26 /public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch() #27 /public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array) #28 /public_html/index.php(89): Mage::run('', 'store') #29 {main}

Trying to enter debug mode results this error: https://github.com/facebookincubator/facebook-for-magento/issues/85

kunzi commented 6 years ago

After fixing the debug mode error I got this error from there:

"\"Notice: Array to string conversion in /public_html\\/lib\\/Zend\\/Controller\\/Response\\/Abstract.php on line 391 : #0 /public_html\\/lib\\/Zend\\/Controller\\/Response\\/Abstract.php(391): mageCoreErrorHandler(8, 'Array to string...', '\\', 391, Array)\\n#1 /public_html\\/app\\/code\\/community\\/Facebook\\/AdsExtension\\/controllers\\/Adminhtml\\/FbdebugController.php(56): Zend_Controller_Response_Abstract->setBody(Array)\\n#2 /public_html\\/app\\/code\\/core\\/Mage\\/Core\\/Controller\\/Varien\\/Action.php(418): Facebook_AdsExtension_Adminhtml_FbdebugController->ajaxAction()\\n#3 /public_html\\/app\\/code\\/core\\/Mage\\/Core\\/Controller\\/Varien\\/Router\\/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('ajax')\\n#4 /public_html\\/app\\/code\\/core\\/Mage\\/Core\\/Controller\\/Varien\\/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))\\n#5 /public_html\\/app\\/code\\/core\\/Mage\\/Core\\/Model\\/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()\\n#6 /public_html\\/app\\/Mage.php(683): Mage_Core_Model_App->run(Array)\\n#7 /public_html\\/index.php(89): Mage::run('', 'store')\\n#8 {main}\""

dmitridr commented 6 years ago

Hello thanks for reporting,

We have an open PR to fix the stock issue, so it should be fixed in 2.6.1, glad you fixed it yourself anyway.

As for the problem in Debug Mode, good catch. That line does nothing as far as I can tell, it does not indicate a problem with your configuration but rather a problem with debug mode, could you try deleting the line causing the problem? , I will also send out a fix that deletes that line.

dmitridr commented 6 years ago

I landed the fix just now, we should have a new version in a couple of days with the problem removed.

dmitridr commented 6 years ago

New version is out with the fix, thanks for reporting this @kunzi ! If you see anything else like this please don't hesitate to reach out.