Our blog
Magento Module Not Working? This Might be Why
After a few hours of intense googling I have finally figured out why my Magento custom module is refusing to activate. I finally figured it out. It's all because the snippet of XML that I copied and pasted off a tutorial somewhere did not have the right capitalisation.
doesn't work - EC_All.xml
-
<?xml version="1.0"?>
-
<config>
-
<modules>
-
<EC_CatalogSearch>
-
<active>true</active>
-
<codepool>local</codepool>
-
</EC_CatalogSearch>
-
</modules>
-
</config>
does work - EC_All.xml
-
<?xml version="1.0"?>
-
<config>
-
<modules>
-
<EC_CatalogSearch>
-
<active>true</active>
-
<codePool>local</codePool>
-
</EC_CatalogSearch>
-
</modules>
-
</config>
I think next time I'm just going to use the module creator!
More Reading:
5 Comments
|
Spotted it - one letter only! codePool not codepool. (Bang head on wall). Also had a capitalisation problem like this last week with a customer trying to customise one our Magic Zoom Plus module. http://www.magictoolbox.com/magiczoomplus_magento/ Still, Magento mods are a whole lot easier than CRELoaded mods and don't even mention ECommerceTemplates... |
|
Hmm, |
|
Its camel case on the codePool bit for anyone that hasn't spotted the difference. I haven't done any extensive testing but it seems Magento is at once inconsistent in its casing requirements and also quite picky that its the correct case. I'm surprised as well but there you go. I suppose you only need to get this right once and then you are away. If you copied and pasted a working version you probably wouldn't even notice that it was this picky. Reminds me of trying to code javascript before the days of firebug et al - zero debugging basically. As I say in the post, I think in future I will kick off with a template module or one of the module creators. My only concern with the module creators is that they will create more files than I need which could cause me more problems than they solve. In this instance I wanted to override one method in the catalogsearch helper (to strip trailing s from search terms). |
|
Dmitry August 19th, 2009 |
Framework is not picky... XML is case–sensitive! You should know that if you are a developer. |
|
helpful Dmitry, yes we know its case sensitive, but the issue is with the inconsistent capitalisation in the Magento system. |
RSS Feed
Magic Toolbox
June 16th, 2009