I get this error when trying to place an order:

Fatal error: Call to undefined method Mage_Core_Model_Email_Template_Filter::getInlineCssFile() in /.../app/code/core/Mage/Core/Model/Email/Template.php on line 313

I updated Magento to the latest version ( and cleared cache but I still get this error.

The function getInlineCssFile() is in /app/code/core/Mage/Core/Model/Email/Template/Filter.php file.

How can I fix this?

1 Answer 1


This sounds like the Magento autoload is not working providing the file is in the correct place and the class name hasn't been changed.

I would do the following:

  1. Download the latest version of Magento
  2. Replace the app/Mage.php file and lib/Varien/Autoload.php file as they are responsible for autoloading a class

I would then check make a test order and see if fixes it. If it doesn't I would disable all community and local modules and try again and see does it work.

If it does then I would start re-enabling a few modules at a time until I found the module which caused the issue.

  • It's still the same. Even if I delete the Template.php file I still get this error... (I'm 100% that I deleted the right file :))
    – ptinca
    Mar 17, 2016 at 18:47
  • After looking at the code its loading the class just before the try/catch on line 304 of the class Mage_Core_Model_Email_Template. Can you add Mage::log($processor, null, 'email_class.log', true); just before the try and catch and see what class is logged and then remove the Mage::log Mar 17, 2016 at 19:06
  • I don't think it even gets to here. No log file is created. And even if I remove the line 313 in Template.php I still get the same error. Even if I remove everything from this file the error is still there. It's like it's using some other file. I did clear cache and it doesn't help. :S
    – ptinca
    Mar 17, 2016 at 19:20
  • If you create a test.php file on your local env and add the following gist, do you get a class name when you run test.php ? gist.github.com/colinmurphy/2fabf460a1b5a3e5e4bf Mar 17, 2016 at 19:31
  • I ended up reinstalling magento. Thanks for your help.
    – ptinca
    Mar 22, 2016 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.