Skip to main content
edited body
Source Link

This is a bug which is related with magento compiler. I will give you a short glance of what is actually happens here.

During compilation enabled, magento uses a copy of every files inside the directory include/src. Since every file have a corresponding copy in single directory and magento uses this single directory while coimpilation enabled, magnetomagento performs faster.

When you do $this->_forward('testOne'), magento now process router match processing one more time. As module didnt change, Mage_Core_Controller_Varien_Action::preDispatch method intents to make Varien_Autoload to load the the include/src/Mage_Cms_IndexController.php again. This is what failing here. Why it fails ? You have found out the answer. It is the bug which is present in includes\src\Varien_Autoload::registerScope()

static public function registerScope($code) { self::$_scope = $code; if (defined('COMPILER_INCLUDE_PATH')) { // Change to include_once to prevent including multiple times !!! //@include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php'; @include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php'; } } 

The last line of code is failing in this particular case. This is because, magento is trying to load the same Mage_Cms_IndexController which is avialble in includes/src when you perform a _forward action.

So if you use include_once instead of include, then it will resolve the issue.

For more info, use this

This is a bug which is related with magento compiler. I will give you a short glance of what is actually happens here.

During compilation enabled, magento uses a copy of every files inside the directory include/src. Since every file have a corresponding copy in single directory and magento uses this single directory while coimpilation enabled, magneto performs faster.

When you do $this->_forward('testOne'), magento now process router match processing one more time. As module didnt change, Mage_Core_Controller_Varien_Action::preDispatch method intents to make Varien_Autoload to load the the include/src/Mage_Cms_IndexController.php again. This is what failing here. Why it fails ? You have found out the answer. It is the bug which is present in includes\src\Varien_Autoload::registerScope()

static public function registerScope($code) { self::$_scope = $code; if (defined('COMPILER_INCLUDE_PATH')) { // Change to include_once to prevent including multiple times !!! //@include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php'; @include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php'; } } 

The last line of code is failing in this particular case. This is because, magento is trying to load the same Mage_Cms_IndexController which is avialble in includes/src when you perform a _forward action.

So if you use include_once instead of include, then it will resolve the issue.

For more info, use this

This is a bug which is related with magento compiler. I will give you a short glance of what is actually happens here.

During compilation enabled, magento uses a copy of every files inside the directory include/src. Since every file have a corresponding copy in single directory and magento uses this single directory while coimpilation enabled, magento performs faster.

When you do $this->_forward('testOne'), magento now process router match processing one more time. As module didnt change, Mage_Core_Controller_Varien_Action::preDispatch method intents to make Varien_Autoload to load the the include/src/Mage_Cms_IndexController.php again. This is what failing here. Why it fails ? You have found out the answer. It is the bug which is present in includes\src\Varien_Autoload::registerScope()

static public function registerScope($code) { self::$_scope = $code; if (defined('COMPILER_INCLUDE_PATH')) { // Change to include_once to prevent including multiple times !!! //@include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php'; @include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php'; } } 

The last line of code is failing in this particular case. This is because, magento is trying to load the same Mage_Cms_IndexController which is avialble in includes/src when you perform a _forward action.

So if you use include_once instead of include, then it will resolve the issue.

For more info, use this

Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 64
  • 104

This is a bug which is related with magento compiler. I will give you a short glance of what is actually happens here.

During compilation enabled, magento uses a copy of every files inside the directory include/src. Since every file have a corresponding copy in single directory and magento uses this single directory while coimpilation enabled, magneto performs faster.

When you do $this->_forward('testOne'), magento now process router match processing one more time. As module didnt change, Mage_Core_Controller_Varien_Action::preDispatch method intents to make Varien_Autoload to load the the include/src/Mage_Cms_IndexController.php again. This is what failing here. Why it fails ? You have found out the answer. It is the bug which is present in includes\src\Varien_Autoload::registerScope()

static public function registerScope($code) { self::$_scope = $code; if (defined('COMPILER_INCLUDE_PATH')) { // Change to include_once to prevent including multiple times !!! //@include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php'; @include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php'; } } 

The last line of code is failing in this particular case. This is because, magento is trying to load the same Mage_Cms_IndexController which is avialble in includes/src when you perform a _forward action.

So if you use include_once instead of include, then it will resolve the issue.

For more info, use this