Magento: Why do controller action predispatch events not fire if the controller is rewritten?
Posted
by
mattalexx
on Stack Overflow
See other posts from Stack Overflow
or by mattalexx
Published on 2011-01-08T18:32:46Z
Indexed on
2011/01/08
18:53 UTC
Read the original article
Hit count: 236
Why do controller action predispatch events not fire if the controller is rewritten? Here is a snippet of store/app/code/core/Mage/Core/Controller/Varien/Action.php
:
abstract class Mage_Core_Controller_Varien_Action
{
// [...]
public function preDispatch()
{
// [...]
if ($this->_rewrite()) {
return; // [What is the purpose if this?]
}
// [...]
// [This is where my event needs to be firing, but this code never gets
// executed because the controller is rewritten]
Mage::dispatchEvent(
'controller_action_predispatch_'.$this->getFullActionName(),
array('controller_action'=>$this)
);
}
// [...]
}
I don't know where to start fixing this problem. Anyone out there ever dealt with this before?
© Stack Overflow or respective owner