2

Where is the code located so I don't have to whitelist blocks? I hate this feature. I know it's security stuff but I don't want it on my local environment. Can someone please tell me how to remove it on the Magento 1.14.2.4.

Thanks

vagrant@precise32:/var/www/n98-magerun$ php n98-magerun.phar media:sync


  [Symfony\Component\Console\Exception\CommandNotFoundException]  
  Command "media:sync" is not defined.                            
  Did you mean this?                                              
      media:dump      
4
  • What magento version are you on?
    – Rebel
    Commented May 5, 2017 at 22:14
  • @Rebel Magento ver. 1.14.2.4
    – Head
    Commented May 6, 2017 at 16:10
  • Any updates @Rebel
    – Head
    Commented May 9, 2017 at 18:03
  • Unfortunately, not to my knowledge.
    – Rebel
    Commented May 15, 2017 at 15:05

2 Answers 2

5
+25

Don't do this, and just search for one of the many tools that can assist such as

https://github.com/peterjaap/magerun-addons

Find non-whitelisted vars/blocks to be compatible with SUPEE-6788 and Magento >1.9.2.2

Thanks to @timvroom for the bulk of the code.

dev:template-vars [--addblocks[="true|false"]] [--addvariables[="true|false"]]

5
  • Steps 1 and 2 worked fine but step 3 which is suppose to indicate if it's installed correct threw this error: -bash: n98-magerun.phar: command not found @MartyS Magemojo Support
    – Head
    Commented May 10, 2017 at 18:18
  • You still have to download or install the n98 tool itself for any module in n98-magerun to work.
    – MartyS
    Commented May 11, 2017 at 14:43
  • Would that be this? github.com/netz98/n98-magerun
    – Head
    Commented May 11, 2017 at 18:12
  • I got it installed but now i'm getting this error: vagrant@precise32:/var/www/n98-magerun$ php n98-magerun.phar media:sync [Symfony\Component\Console\Exception\CommandNotFoundException] Command "media:sync" is not defined. Did you mean this? media:dump
    – Head
    Commented May 11, 2017 at 20:53
  • I posted the error in my original post so it's easier to read. So close. Please help a bit more @MartyS Magemojo Support
    – Head
    Commented May 11, 2017 at 20:54
0
  1. Copy app/code/core/Mage/Admin/Model/Block.php to app/code/local/Mage/Admin/Model/Block.php and change function isTypeAllowed to look like this:

    public function isTypeAllowed($type)
    {   
      #return Mage::helper('admin/block')->isTypeAllowed($type);
      return true;
    }   
    
  2. Might be absolete but I will add it here anyway. Copy app/code/core/Mage/Admin/Helper/Block.php to app/code/local/Mage/Admin/Helper/Block.php and change function isTypeAllowed to look like this:

    public function isTypeAllowed($type)
    {               
      #return isset($this->_allowedTypes[$type]);
      return true;                                                                                                                                                 
    }               
    
8
  • looks good; I'm checking it now. Thank you.
    – Head
    Commented May 9, 2017 at 19:09
  • I'm still throwing errors in my log and my blocks aren't populating.2017-05-09T19:13:12+00:00 DEBUG (7): Security problem: catalog/product_list has not been whitelisted. 2017-05-09T19:13:12+00:00 DEBUG (7): Security problem: me_quickview/popup has not been whitelisted.
    – Head
    Commented May 9, 2017 at 19:13
  • Cleared cache as well. Nothing. =/
    – Head
    Commented May 9, 2017 at 19:16
  • clear magento cache, opcache if you have one, restart server OR directly edit app/code/core/Mage/Admin/Model/Block.php it is fully working here. Commented May 9, 2017 at 19:20
  • this call $this->_permissionBlock->isTypeAllowed($blockParameters['type']) returns false in your case but it should return true. (_permissionBlock = Mage::getModel('admin/block')) Commented May 9, 2017 at 19:21

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.