Magento system.xml case sensitive module name issue
-
30-09-2020 - |
Domanda
I have created a custom controller in custom module in Magento ce-1.9.2.4.
Module name is given in camelcase as I want to try if Magento accepts camel-case module name in system.xml
also other than config.xml
.
But when I create the system.xml
as below it doesn't create tab in System >> Configuration
page.
<?xml version="1.0"?>
<config>
<tabs>
<custom translate="label" module="myModule">
<label>Custom FirmInfo</label>
<sort_order>100</sort_order>
</custom>
</tabs>
<sections>
<myModule translate="label" module="myModule">
<label>Mymodule</label>
<tab>Autofill</tab>
<frontend_type>text</frontend_type>
<sort_order>1000</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<settings translate="label">
<label>Settings</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<enable translate="label">
<label>Enable</label>
<comment><![CDATA[Enable or Disable this extension.]]></comment>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</enable>
</fields>
</settings>
</groups>
</myModule>
</sections>
</config>
Please can anybody let me know what could be the issue with the system.xml
here.
Soluzione
Pretty sure it has nothing to do with the case here.
An evident problem is your code is that you declare your new tab like this:
<tabs>
<custom translate="label" module="myModule">
<label>Custom FirmInfo</label>
<sort_order>100</sort_order>
</custom>
</tabs>
But when you assign your section to your tab you don't assign the right tab:
<tab>Autofill</tab>
To fix that you should replace this code with:
<tab>custom</tab>
As custom
is the id of the tab you created.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange