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

Debug mode error #85

Closed kunzi closed 6 years ago

kunzi commented 6 years ago

I'm trying to enter the debug mode, but I get this error:

Warning: include_once(Facebook_AdsExtension_Model_FBProductFeedSamples.php): failed to open stream: No such file or directory  in /public_html/app/code/community/Facebook/AdsExtension/controllers/Adminhtml/FbdebugController.php on line 20

#0 /public_html/app/code/community/Facebook/AdsExtension/controllers/Adminhtml/FbdebugController.php(20): mageCoreErrorHandler(2, 'include_once(Fa...', '', 20, Array)
#1 /public_html/app/code/community/Facebook/AdsExtension/controllers/Adminhtml/FbdebugController.php(20): include_once()
#2 /public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(337): include('')
#3 /public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(308): Mage_Core_Controller_Varien_Router_Standard->_includeControllerClass('', 'Facebook_AdsExt...')
#4 /public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(196): Mage_Core_Controller_Varien_Router_Standard->_validateControllerClassName('Facebook_AdsExt...', 'fbdebug')
#5 /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))
#6 /public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#7 /public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#8 /public_html/index.php(89): Mage::run('', 'store')

I installed the extension via Magento Connect.

kunzi commented 6 years ago

I fixed this issue by editing lines 17 and 18 in /app/code/community/Facebook/AdsExtension/controllers/Adminhtml/FbdebugController.php to be like this:

if (file_exists(__DIR__.'/../../Model/FBProductFeedSamples.php')) {
  include_once __DIR__.'/../../Model/FBProductFeedSamples.php';
dmitridr commented 6 years ago

Hi @kunzi good find! Would you mind sending us a PR to fix that? Would love to give you credit for that.

dmitridr commented 6 years ago

Just a heads up though, If you don't send it in 1-2 days we will probably add the fix ourselves, seems pretty important!