Skip to main content
Tweeted twitter.com/#!/StackMagento/status/566891838519668736
added 639 characters in body
Source Link
Php4u
  • 89
  • 1
  • 7

Simple example tested on magento 1.7.0.2

Created overloaded controller for Mage_Cms_IndexController

<routers> <cms> <args> <modules> <My_Extension before="Mage_Cms">My_Extension</My_Extension> </modules> </args> </cms> </routers> 

In my controller I have two methods

testOneAction and testTwoAction

I can confirm that they work my just going into /cms/index/testOne and /cms/index/testTwo

Now the fun part

Created third method

public function testThirdAction() { $this->_forward('testOne'); } 

When compiler is DISABLED going into /cms/index/testThird I can see data from testOne

When compiler is ENABLED - got blank page

Even with display_errors, developer mode, full error reporting, there is absolutely nothing in magento logs, web server logs or php error logs.

Tried xdebug and it pointed me into direction that request is not marked as dispatched and then it dies silently.

What I found so far: In includes/src/Varien_Autoload.php

/** * Register autoload scope * This process allow include scope file which can contain classes * definition which are used for this scope * * @param string $code scope code */ static public function registerScope($code) { self::$_scope = $code; if (defined('COMPILER_INCLUDE_PATH')) { @include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php'; } } 

Looks like @ makes it to die silently, if I change it to include_once, everything works great

Anyone can help?

Simple example tested on magento 1.7.0.2

Created overloaded controller for Mage_Cms_IndexController

<routers> <cms> <args> <modules> <My_Extension before="Mage_Cms">My_Extension</My_Extension> </modules> </args> </cms> </routers> 

In my controller I have two methods

testOneAction and testTwoAction

I can confirm that they work my just going into /cms/index/testOne and /cms/index/testTwo

Now the fun part

Created third method

public function testThirdAction() { $this->_forward('testOne'); } 

When compiler is DISABLED going into /cms/index/testThird I can see data from testOne

When compiler is ENABLED - got blank page

Even with display_errors, developer mode, full error reporting, there is absolutely nothing in magento logs, web server logs or php error logs.

Tried xdebug and it pointed me into direction that request is not marked as dispatched and then it dies silently.

Anyone can help?

Simple example tested on magento 1.7.0.2

Created overloaded controller for Mage_Cms_IndexController

<routers> <cms> <args> <modules> <My_Extension before="Mage_Cms">My_Extension</My_Extension> </modules> </args> </cms> </routers> 

In my controller I have two methods

testOneAction and testTwoAction

I can confirm that they work my just going into /cms/index/testOne and /cms/index/testTwo

Now the fun part

Created third method

public function testThirdAction() { $this->_forward('testOne'); } 

When compiler is DISABLED going into /cms/index/testThird I can see data from testOne

When compiler is ENABLED - got blank page

Even with display_errors, developer mode, full error reporting, there is absolutely nothing in magento logs, web server logs or php error logs.

Tried xdebug and it pointed me into direction that request is not marked as dispatched and then it dies silently.

What I found so far: In includes/src/Varien_Autoload.php

/** * Register autoload scope * This process allow include scope file which can contain classes * definition which are used for this scope * * @param string $code scope code */ static public function registerScope($code) { self::$_scope = $code; if (defined('COMPILER_INCLUDE_PATH')) { @include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php'; } } 

Looks like @ makes it to die silently, if I change it to include_once, everything works great

Anyone can help?

Source Link
Php4u
  • 89
  • 1
  • 7

Controller ignoring _forward when compiler is on - is that desired behaviour?

Simple example tested on magento 1.7.0.2

Created overloaded controller for Mage_Cms_IndexController

<routers> <cms> <args> <modules> <My_Extension before="Mage_Cms">My_Extension</My_Extension> </modules> </args> </cms> </routers> 

In my controller I have two methods

testOneAction and testTwoAction

I can confirm that they work my just going into /cms/index/testOne and /cms/index/testTwo

Now the fun part

Created third method

public function testThirdAction() { $this->_forward('testOne'); } 

When compiler is DISABLED going into /cms/index/testThird I can see data from testOne

When compiler is ENABLED - got blank page

Even with display_errors, developer mode, full error reporting, there is absolutely nothing in magento logs, web server logs or php error logs.

Tried xdebug and it pointed me into direction that request is not marked as dispatched and then it dies silently.

Anyone can help?