It could be a number of things (some that won't be debuggable since you altered your config.xml
file before posting here), but one thing that pops out immediately is this
<file>
module/module.xml
</file>
should be this
<file>module/module.xml</file>
For reasons myriad and complicated, Magento and PHP parse XML documents with white space being significant in text nodes. That means when the layout update XML parsing code gets to here
#File: app/code/core/Mage/Core/Model/Layout/Update.php
public function getFileLayoutUpdatesXml(
//...
foreach ($updateFiles as $file) {
$filename = $design->getLayoutFilename($file, array(
'_area' => $area,
'_package' => $package,
'_theme' => $theme
));
if (!is_readable($filename)) {
continue;
}
The $filename
string it generates for your code will look like
string '/path/to/mage/app/design/frontend/base/default/layout/
module/module.xml
' (length=...)
That is, with the big old hunk of whitespace in the middle. This path will not pass the is_readable
check, so your layout file will be skipped.
Remove the white space from your node and you'll have removed one potential problem.
Best Answer
The file system path doesn't match the specifications from the module registration file.
For a registration file like this:
Magento will first take the
<codePool>
node value (watch the upper case P in the node name) and append that to app/code/, which gives us app/code/local/.Next Magento takes the name of the node inside of
<modules>
, in this exampleExample_TestModule
.All underscores are converted to slashes from that string, and then it is appended to the code pool. This gives us the file system path to the module, in the example it is app/code/local/Example/TestModule/.
Now the hardcoded path etc/config.xml is appended.
So the final path to the config.xml file is
The casing of the directory names has to match the specified path exactly.
If it doesn't it will work only on case insensitive file systems (like windows or the default OSX fs), but not on Unix.
One more thing: just like the autoloader, the first character of the namespace and module directories will be uppercased. So
<example_testModule>
would still end up being interpreted as Example/TestModule/.