php - Fatal error: Undefined class constant 'FORM_KEY' -- Magento -


after upgrading magento ver. 1.7.0.2 1.9.2.0 i've run intop error , can't find solution anywhere.

the error is:

fatal error: undefined class constant 'form_key' in \app\code\core\mage\checkout\helper\cart.php on line 67   

no other errors in system.log, exception.log or php error.log. error printout on page.

how can fix this?

the class constant mage_core_model_url::form_key , did not exist yet in magento 1.7

if use magento compiler active (you shouldn't, see: when should use magento compiler), recompile. if use opcode cache apc, flush it.

but issue made copy of class in app/code/local/mage/core/model/url.php hack changes it. check changed there, replace new file app/code/core/mage/core/model/url.php , re-apply changes1.


1. better, don't put in app/code/local/mage , user proper class rewriting


Comments