浏览文章
文章信息
后端 Magento2 Notice: Undefined index: id in /magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
13877
<tab>aiweline</tab>
中的aiweline不存在
<?xml version="1.0"?> <!-- /** * @author Aiweline Team * @copyright Copyright (c) 2019 Aiweline (https://www.aiweline.com) * @package Aiweline_Geoip */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/system_file.xsd"> <system> <section id="amgeoip" translate="label" type="text" sortOrder="70504" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Geo Ip Data</label> <tab>aiweline</tab> <resource>Aiweline_Geoip::aiweline_geoip</resource> <group id="download_import" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> <label>Download and Import</label> <field id="download_import_button" translate="label comment" type="button" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> <frontend_model>Aiweline\Geoip\Block\Adminhtml\Settings\DownloadNImport</frontend_model> </field> </group>
解决方法:新增一个tab id在section之前
<tab id="aiweline" translate="label" sortOrder="10"> <label>AI微蓝</label> </tab>
如下
<?xml version="1.0"?> <!-- /** * @author Aiweline Team * @copyright Copyright (c) 2019 Aiweline (https://www.aiwleine.com) * @package Aiweline_Geoip */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/system_file.xsd"> <system> <tab id="aiweline" translate="label" sortOrder="10"> <label>AI微蓝</label> </tab> <section id="amgeoip" translate="label" type="text" sortOrder="70504" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Geo Ip Data</label> <tab>amasty</tab> <resource>Aiwleine_Geoip::aiweline_geoip</resource> <group id="download_import" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> <label>Download and Import</label> <field id="download_import_button" translate="label comment" type="button" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> <frontend_model>Aiweline\Geoip\Block\Adminhtml\Settings\DownloadNImport</frontend_model> </field> </group>