Veriteworks / CookieFix

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

Gives Error after installtion #28

Open magesavvy opened 3 years ago

magesavvy commented 3 years ago

It gives me folllowing error after installation

Fatal error: Uncaught Error: Call to undefined method Magento\Framework\Stdlib\Cookie\PublicCookieMetadata::setSameSite() in /var/www/html/app/code/Veriteworks/CookieFix/Plugin/SwitchSameSite.php:67 Stack trace: #0 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(121): Veriteworks\CookieFix\Plugin\SwitchSameSite->beforeSetPublicCookie(Object(Magento\Framework\Stdlib\Cookie\PhpCookieManager\Interceptor), 'PHPSESSID', 'ahji1fi0bn7jsur...', Object(Magento\Framework\Stdlib\Cookie\PublicCookieMetadata)) #1 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\Stdlib\Cookie\PhpCookieManager\Interceptor->Magento\Framework\Interception{closure}('PHPSESSID', 'ahji1fi0bn7jsur...', Object(Magento\Framework\Stdlib\Cookie\PublicCookieMetadata)) #2 /var/www/html/generated/code/Magento/Framework/Stdlib/Cookie/PhpCookieManager/Interceptor.php(26): Magento\Framework\Stdlib\Cookie\PhpCookieManager\Interceptor->___callPlugins('setPublicCookie', Array, Array) #3 /var/www/html/vendor/m in /var/www/html/app/code/Veriteworks/CookieFix/Plugin/SwitchSameSite.php on line 67

tuyennn commented 3 years ago

@HirokazuNishi Since you remove the override \Magento\Framework\Stdlib\Cookie\PublicCookieMetadata the function setSameSite was no longer exist

tuyennn commented 3 years ago

Related issue https://github.com/Veriteworks/CookieFix/issues/23