madalinoprea / magneto-varnish

Magento extension that implements full page caching using Varnish
http://moprea.ro/2011/may/6/magento-performance-optimization-varnish-cache-3/
123 stars 36 forks source link

Fatal Error: Unable to save any form in Magento admin #27

Open 33hops opened 11 years ago

33hops commented 11 years ago

I installed the extension in Magento 1.7.0.2, the Varnish part works well but I get this error when trying to update any form in the Magento admin:

Fatal error: Call to a member function isActive() on a non-object in /var/www/html/magento/app/code/community/Magneto/Varnish/Helper/Data.php on line 113

I am using Varnish in a separate server, in any case that does not seem to be the problem

The part of code throwing the error is:

(line 113) if (!Mage::getSingleton('enterprise_logging/config')->isActive($eventCode, true)) { return; }

I have searched the web with no luck, there must be more 1.7.0.2 users with the same problem

33hops commented 11 years ago

Provisional solution:

I am posting this auto-reply here just in case somebody gets the same error, in any case if somebody knows how to fix it please post code.

The function where the offender line is at

/var/www/html/magento/app/code/community/Magneto/Varnish/Helper/Data.php on line 113

is supposed to log magneto-varnish purges in Magento admin log. You can safely skip it by just making the function return false. In any case this issue has to be related to any recent Magento structure or syntax change previous to version 1.7.0.2. I don't have much time to investigate it, for me it is O.K. to simply turn off logging. I guess a simple update inside getSingleton('-- HERE --') providing the route to the loggin facility should be enough.

0d1 commented 11 years ago

hello,

could you please paste the portion of code you modified ?

thank you.