Usually we are defining the module version in app/code/local/Mymodule/Mynamespace/etc/config.xml file. But if we put the version in app/etc/modules/Mymodule_Mynamespace.xml it also works fine. I know this is because when rendering the Magento system it loads and merge all the *.xml files to one huge xml file. But the thing I want to know is it ok to use the version definition in activation config rather than etc/config.xml ? Any suggestions will be appreciated.


I suggest to leave it in config.xml to keep a consistency in your code. but if, for some reason, you need it in the declaration file (in etc/modules) I don't see any harm in putting it there.
Just be careful. If you add the version in both files the value in config.xml will override the one in etc/modules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.