Comments (2)
Hi ecrocombe,
I tried the above given solution with the 2.4.5-p1 EE version and PHP8.1. The solution works fine for the nonl-ogged in user but when the user is logged in it gives the below error. Please check and let us know.
`1 exception(s):
Exception #0 (Exception): Deprecated Functionality: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/magento/vendor/facebook/facebook-for-magento2/Helper/MagentoDataHelper.php on line 481
Exception #0 (Exception): Deprecated Functionality: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/magento/vendor/facebook/facebook-for-magento2/Helper/MagentoDataHelper.php on line 481`
from facebook-for-magento2.
@pratikvs , what I've found is that in the dev-main branch, the update from 2 weeks ago just updated the facebook/php-business-sdk 9.0.3 to >=15.0.0, so the sdk is now compatible with php8.1, but they haven't fixed the strtolower bug.
I've opened a PR for this issue: #132
Until it will be merged into, here is a patch that you can use to fix that:
Create a file like patches/composer/facebook-m2-php8fix/facebook-m2-1.4.5-1.4.6-php8.1--1.patch
--- Helper/MagentoDataHelper.php 2022-03-15 15:40:14.000000000 +0000
+++ Helper/MagentoDataHelper.php 2023-01-05 18:16:03.949331672 +0000
@@ -478,7 +478,7 @@
}
private function hashValue($string){
- return hash('sha256', strtolower($string));
+ return hash('sha256', strtolower((string)$string));
}
// TODO Remaining user/custom data methods that can be obtained using Magento.
then also add it into composer.json like:
"patches": {
"facebook/facebook-for-magento2": {
"facebook-m2-php81--1": "patches/composer/facebook-m2-php8fix/facebook-m2-1.4.5-1.4.6-php8.1--1.patch"
}
...
from facebook-for-magento2.
Related Issues (20)
- [Bug]: Response header name 'FacebookAds\\CrashReporter ' contains invalid characters, aborting request
- Critical | Magento commerce 2.4.4 | Facebook Business Extension compatibility issue HOT 7
- Cannot connect FB Business account HOT 5
- [Bug]: this method dont work on varnish cache (trackServerEvent on .phtml) HOT 2
- [Bug]: Magento Frontend Not loading after installing the version 1.4.5 HOT 1
- PHP8 compatibility patches for Facebook Magento 2 Extension.
- Add to cart issue
- Setup not being saved HOT 1
- [Bug]: Table name missing dynamic prefix [fix]
- Facebook Pixel (Catalog API): Not working HOT 2
- [Bug]: Front controller reached 100 router match iterations
- [Bug]: Security errors in Facebook Magento 2 extension | V1.4.6
- [Bug]: Error while update extension by composer HOT 1
- [Bug]: GDPR Not Managed
- [Bug]: InitiateCheckout and Purchase did not calculate the discounted price
- [Bug]: Showing blank screen at frontend
- Couldn't use the extension in Multiwebsite environment in Magento 2
- [Bug]: Products with special price not getting saved HOT 1
- [Bug]: Send Event add to cart
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-for-magento2.