1 Comment

How Magento process block defined inside layout xml?

Change CSS for navigation bar
Reduce queries of OnePica Image CDN

I have strange situation where block defined in xml is not loaded. Everything is properly defined and it works on more than 500 stores. It is simple layout file like this:


  <?xml version="1.0"?>   
  <layout version="1.0.0">   
      <reference name="root">   
        <action method="setTemplate"><template>page/1column.phtml</template></action>   
      <reference name="content">   
        <block type="company_test/example" name="test_index" template="test/index.phtml"/>   


  <?xml version="1.0"?>

Which normally work, but in one particular store it won’t work after upgrading the extension. But if I rename folder Company to Companyy and rename company also inside files it will work:

<block type="companyy_test/example" name="test_index" template="test/index.phtml"/> 

The same happens also if I put test_index block into any other extension layout file inside this store, it won’t work when first folder name is Company. My guess it that old file is still in server cache (not Magento cache). It won’t log any error.

Now to my question. Which file gets block path from layout file and try to handle/process it? Before I start debugging and researching core files it would be useful if I can get any hint where to start.


Related Posts

Change CSS for navigation bar
Reduce queries of OnePica Image CDN

1 Comment on this article

  • User November 12, 2016

    The problem was because somebody disabled extension, not for global scope but only for website scope. Extension appeared in admin, calling block didn’t print any error or false statement, just empty string. Debugging lead me to file app/code/core/Mage/Core/Block/Abstract.php to function toHtml() and inside this function there are lines:

    if (Mage::getStoreConfig('advanced/modules_disable_output/' . $this->getModuleName())) {
        return '';

    which lead me to the conclusion.


Add a comment

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax