I've been trying to add a system.xml
configuration file to a Magento 2 module but I'm getting this error:
Fatal error: Call to undefined method Magento\Config\Model\Config\Structure\Element\Field\Interceptor::shouldCloneFields() in /Users/mludd/Sites/magento2.pippin.pantburk/vendor/magento/module-config/Model/Config.php on line 211
From what I can tell the method shouldCloneFields()
does in fact not exist in that class but the question I have is, am I doing something wrong or is this a bug? The method seems to be declared in another class but I can't even seem to find the Interceptor
class referenced in the error.
This is what my system.xml
looks like:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<!-- Add new Tab -->
<tab id="dummymodule" translate="label" sortOrder="100">
<label>DummyModule</label>
</tab>
<section id="dummymodule" translate="label" type="text" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="1">
<label>DummyModule</label>
<tab>dummymodule</tab>
<resource>Mludd_DummyModule::config_dummymodule</resource>
<group id="first" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>First</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
</group>
<group id="second/id" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Second</label>
<field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
</group>
</section>
</system>
</config>