facebookarchive / facebook-for-magento2

* Pixel on all pages, which trigger events link, PageView, ViewContent, AddToCart, Initiatecheckout and Purchase.* In the background, Syncs the products from the merchants product catalog to Facebook Catalog.* Stores all the data, like pixel id, catalog id, business maanger id, on to the local database on the instance.
Other
46 stars 36 forks source link

500 Error after enabling module #56

Open subineseller opened 3 years ago

subineseller commented 3 years ago

Error 500 error after enabling the module, Installed using composer php-business-sdk installed Home page loading fine category and product page showing Internal Server Error. https://prnt.sc/15go3qc

kanhaiya5590 commented 3 years ago

Hi @subineseller ,

Try this - https://github.com/magento/magento2/issues/21663#issuecomment-674535792 @scommercemage provide some fix

Check your custom modules or extensions and find if you are using either of the following -:

Magento\Catalog\Model\Product (in the constructor)

$this->_product->load($id)

or

$this->_objectManager->get('\Magento\Catalog\Model\Product')->load($id)

If yes then change it to use \Magento\Catalog\Api\ProductRepositoryInterface and load product using getById($id) instead.

Hope this solve your concern

Most of the changes updated in master branch https://github.com/facebookincubator/facebook-for-magento2/pull/57

else pull from master branch

subineseller commented 3 years ago

Hi @kanhaiya5590

We checked all other third party Modules, no issues with any of our other modules. Issue only showing when we enable facebook plugin.

zlik commented 3 years ago

@subineseller, can you please pull new logs from var/log/exception.log andvar/log/facebook-business-extension.log right after you try to open category or product page? Also, which extension version are you using? Thanks!