I had created new module in magento2, When I create new tab get error:
Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in ...\vendor\magento\module-config\Model\Config\Structure\Mapper\Sorting.php on line 34
This code in system.xml file.
<?xml version="1.0"?>
<!--
/**
* @author Magento Addons Team
* @copyright Copyright (c) 2015 Magento Addons (https://www.magentoaddons.com)
* @package Custom_Base
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<tab id="new_module" translate="label" sortOrder="100">
<label>New module</label>
</tab>
<section id="base" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Base Configuration</label>
<tab>new_module</tab>
<resource>Custom_Base::config_module</resource>
<group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Base</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enable Base</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
</group>
</section>
</system>
</config>
Many thanks!