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

Error Read File Log #117

Open TDatBoolfly opened 2 years ago

TDatBoolfly commented 2 years ago

Contact Details

dat.vu@boolfly.com

What happened?

I use Magento 2.4.4, PHP 8.1

I get an error when I go to Store -> FaceBook -> Info in Admin Page url: /admin/fbeadmin/info/index/

  1. Undefined variable $fp

main.ERROR: Warning: Undefined variable $fp in /vendor/facebook/facebook-for-magento2/Helper/LogOrganization.php on line 74

  1. I fixed error first keep giving second error

main.ERROR: Warning: fopen(var/log/facebook-business-extension.log): Failed to open stream: No such file or directory in /vendor/facebook/facebook-for-magento2/Helper/LogOrganization.php on line 92

image

I think you should add a condition that checks if the file exists before opening the file

Magento Version

2.4.4

Plugin Version

1.4.5

Relevant log output

No response

Code of Conduct

drinkingsouls commented 1 year ago

Same issue here. Fixed the initial error using

https://github.com/facebookincubator/facebook-for-magento2/pull/97/files/f61258bb7b32aa74cf4845f076f9bc04b5118262#diff-74272e3d8894045336c01ff8a247635c5970faa197d492f015dc272bd13a3717

But now I have the same secondary error for failed to open stream.