I have created a sample module, but I am not sure if its /module/etc/config.xml
file is getting loaded. I am sure there is a problem in that only. Is there a way that I can find out whether this file is getting loaded?
相关问题
- Magento 1.7.0.2 Index Management overwriting URL R
- Magento: Best way to avoid extension conflicts
- Magento Fatal error: Maximum execution error solut
- jquery/prototype conflicts in Magento
- 404 error when switching between stores when in a
相关文章
- Magento, translate validation error messages
- Magento API order id vs. increment id
- Unique constraint violation on Magento 1.4.0 to 1.
- Editing Magento sales e-mail payment block
- Adding tags to products in Magento
- Magento Collection GroupBy getSize
- Magento upfront payment
- compare only those product who have same category
The free Module List module (built by me) will tell you which module's are installed in the system, and will tell you if your
config.xml
is being loaded.Drop this in the bottom of your index.php, similar to Alans Module List but a quick code copy/paste approach. Remember all of Magento's XML's get combined into one XML tree.
As long as you have Your_Module.xml in app/etc/modules/ and it is enabled (might have to flush the cache if you have caching enabled), app/code//Your/Module/etc/config.xml is one of the most sure things that will load. Other files may not for different reasons, but that one will always load. Whether or not it's properly set up to let your module work is an entirely different story though. I've spent plenty of time debugging a config.xml file to find some minor spelling error was the reason my module wasn't working.
Alternatively, you could throw some invalid XML into it and see if Magento borks out.
If you have a good debugger Xdebug or Zend Debugger, you can check the variable
$mergeToObject
in the methodloadModulesConfiguration
of the classMage_Core_Model_Config
.Or the bad guy way :-), you die the script at the same place but just before return
$mergeToObject;
you doprint_r($mergeToObject);
.You could see in this method if your module is loaded too.
A debugger is your best friend. ;-)
All of this allow to check what is loaded from your
config.xml
but doesn't mean that the syntax is correct into yourconfig.xml
to load models or else. You should take a look in otherconfig.xml
of the core modules to help you.I have forgotten, check if you module is correctly loaded and recognized by Magento after a cache flush, you should take a look in the System > configuration > advanced tab and see if your module name appears.