Magento – SUPEE-6788 – Call to a member function `isTypeAllowed()` on a non-object

errorsupee-6788

I have applied patch SUPEE-6788 but this breaks my store and generates an error:
Call to a member function isTypeAllowed() on a non-object in Mage/Core/Model/Email/Template/Filter.php

I have whitelisted all blocks and variables, but this problem still occurs.

I found out that replacing Mage/Core/Model/Email/Template/Filter.php with code from before the patch solves the problem.

I can't find out how to track down the problem and solve this.
Any suggestions?

Best Answer

If you check the Filter.php file after applying 6788 patch, you will find it is adding below bit of code.

if ($this->_permissionBlock->isTypeAllowed($blockParameters['type'])) {
   $type = $blockParameters['type'];
   $block = $layout->createBlock($type, null, $blockParameters);
}

This $this->_permissionBlock is object of Mage::getModel('admin/block'); model which is new settings added by this security patch. you can find this settings in admin.

Admin -> System -> Permission -> Blocks

Check if this settings are exist in your system. Check class Mage_Admin_Model_Block exist in your system or not.