Open mbensoussan opened 5 years ago
Dear @mbensoussan I guess something went wrong with your update. The method Lesti_Fpc_Helper_Data::getContentType exists and it is callable. Please double check if the code in your shop matches with the one at Github.
Best Regards Gordon
yes i confirm all the files are the same,, If i comment the line bellow (observer line 137), the website work again
/*$this->_getFpc()->save(
new Lesti_Fpc_Model_Fpc_CacheItem($body, time(), Mage::helper('fpc')->getContentType($response)),
$key,
$this->_cacheTags
);*/
i continu my investigation... but for the moment i don't understand.
the bug come from this line : new Lesti_Fpc_Model_Fpc_CacheItem($body, time(), Mage::helper('fpc')->getContentType($response)),
if i replace with : new Lesti_Fpc_Model_Fpc_CacheItem($body, time(), 'text/html; charset=UTF-8'),
the website work, but it's not the solution.
ok so,
when the function :
public function getContentType(\Mage_Core_Controller_Response_Http $response) { foreach ($response->getHeaders() as $header) { if (isset($header['name']) && $header['name'] === 'Content-Type' && isset($header['value'])) { return $header['value']; } } return 'text/html; charset=UTF-8'; }
is in lesti/fpc/helper/data.php, it's like magento don't found him
but if i copy paste the function in lesti/fpc/helper/abstract.php it's work and i have no error.
so i think the files lesti/fpc/helper/data.php don't extends Lesti_Fpc_Helper_Abstract.
why ... for the moment i don't know.
i really don't understand what happen, if you have an idea ?
Did you made sure that your Magento version runs fine with PHP 7.2? https://community.magento.com/t5/News-Announcements/PHP-7-2-Support-Patches-for-Magento-1-are-now-available/td-p/106999
yes, i have make a big test from all the website. i will found the solution ..
perhaps i can now if the abstract class is instantiate ?
all it's work.. i'm just so bad.
i forgot that i have make a surchage in the local directory about the helper data...
sorry for the time. and thank's for you module, it's make a really good job !
Hi, after a big update :
magento version 1.9.3.10 php : 7.2.11 lesti_fpc : 1.4.8
when i turn on lesti_fpc in the cache management, all my website show me an error 500.
you can see the erro bellow, if you have an idea...
Fatal error: Uncaught Error: Call to undefined method Lesti_Fpc_Helper_Data::getContentType() in /var/www/clients/client1/web1/web/magento/app/code/community/Lesti/Fpc/Model/Observer.php:137 Stack trace:
0 /var/www/clients/client1/web1/web/magento/app/code/core/Mage/Core/Model/App.php(1358): Lesti_Fpc_Model_Observer->httpResponseSendBefore(Object(Varien_Event_Observer))
1 /var/www/clients/client1/web1/web/magento/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Lesti_Fpc_Model_Observer), 'httpResponseSen...', Object(Varien_Event_Observer)) #2 /var/www/clients/client1/web1/web/magento/app/Mage.php(451): Mage_Core_Model_App->dispatchEvent('http_response_s...', Array)
3 /var/www/clients/client1/web1/web/magento/app/code/core/Mage/Core/Controller/Response/Http.php(83): Mage::dispatchEvent('http_response_s...', Array)
4 /var/www/clients/client1/web1/web/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(184): Mage_Core_Controller_Response_Http->sendResponse()
5 /var/www in /var/www/clients/client1/web1/web/magento/app/code/community/Lesti/Fpc/Model/Observer.php on line 137