Veriteworks / CookieFix

Fix Magento2.2/2.3/2.4 Cookie SameSite attribute
Academic Free License v3.0
65 stars 35 forks source link

On Customer Login getting Fatal error - Call to undefined method setSameSite() #23

Open WebDweller opened 3 years ago

WebDweller commented 3 years ago

Hello,

After installing the extension, this error appears when Customer Login is attempted.

Fatal error: Uncaught Error: Call to undefined method Magento\Framework\Stdlib\Cookie\PublicCookieMetadata::setSameSite() in /home/customer/www/mysomesite.com/public_html/app/code/Veriteworks/CookieFix/Plugin/SwitchSameSite.php:67 Stack trace: #0 /home/customer/www/mysomesite.com/public_html/vendor/magento/framework/Interception/Interceptor.php(121): Veriteworks\CookieFix\Plugin\SwitchSameSite->beforeSetPublicCookie(Object(Magento\Framework\Stdlib\Cookie\PhpCookieManager\Interceptor), 'private_content...', '07c029ee82b5d34...', Object(Magento\Framework\Stdlib\Cookie\PublicCookieMetadata)) #1 /home/customer/www/mysomesite.com/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\Stdlib\Cookie\PhpCookieManager\Interceptor->Magento\Framework\Interception\{closure}('private_content...', '07c029ee82b5d34...', Object(Magento\Framework\Stdlib\Cookie\PublicCookieMetadata)) #2 /home/customer/www/mysomesite.com/public_html/generated/code/Magento/Framework/Stdlib/Cookie/PhpCookieManager/In in /home/customer/www/mysomesite.com/public_html/app/code/Veriteworks/CookieFix/Plugin/SwitchSameSite.php on line 67

Magento Community 2.3.6 CookieFix latest version installed today HTTPS is enabled

Checked on: Mozilla Firefox: 84.0.2 (32-bit) Microsoft Edge: Version 87.0.664.66 (Official build) (64-bit) Chrome: Version 87.0.4280.88 (Official Build) (64-bit)

HirokazuNishi commented 3 years ago

@WebDweller Magento2.3.x doesn't have official same site cookie implementation. Do not install latest codes into 2.3.x. Please install 2.4.1.