0

I installed amasty elasticsearch module. But I am getting errors like this. I researched a little. In the system.xml file it says make changes but I could not.

1 exception(s):

Exception #0 (Exception): Notice: Undefined index: id in /home/petyol/public_html/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 72

Exception #0 (Exception): Notice: Undefined index: id in /home/petyol/public_html/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 72

#1 Magento\Config\Model\Config\Structure\Element\Iterator->setElements() called at [vendor/magento/module-config/Model/Config/Structure.php:146]
#2 Magento\Config\Model\Config\Structure->getTabs() called at [generated/code/Magento/Config/Model/Config/Structure/Interceptor.php:23]
#3 Magento\Config\Model\Config\Structure\Interceptor->getTabs() called at [vendor/magento/module-config/Model/Config/Structure.php:209]
#4 Magento\Config\Model\Config\Structure->getFirstSection() called at [generated/code/Magento/Config/Model/Config/Structure/Interceptor.php:59]
#5 Magento\Config\Model\Config\Structure\Interceptor->getFirstSection() called at [vendor/magento/module-config/Controller/Adminhtml/System/AbstractConfig.php:63]
#6 Magento\Config\Controller\Adminhtml\System\AbstractConfig->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#7 Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#8 Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143]
#9 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#10 Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#11 Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->___callPlugins() called at [generated/code/Magento/Config/Controller/Adminhtml/System/Config/Index/Interceptor.php:32]
#12 Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:186]
#13 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:118]
#14 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#15 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#16 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#17 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23]
#18 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#19 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#20 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#21 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:29]

system.xml

    <?xml version="1.0"?>
<!--
/**
 * @author Amasty Team
 * @copyright Copyright (c) 2018 Amasty (https://www.amasty.com)
 * @package Amasty_ElasticSearch
 */
-->

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="amasty_elastic" translate="label" type="text" sortOrder="51219" showInDefault="1" showInWebsite="0" showInStore="0">
            <resource>Amasty_ElasticSearch::config</resource>
            <class>separator-top</class>
            <label>Elastic Search</label>
            <tab>amasty</tab>
            <group id="amasty_information" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1"
                   showInStore="1">
                <label>Information</label>
                <frontend_model>Amasty\ElasticSearch\Block\Adminhtml\System\Config\Information</frontend_model>
            </group>
            <group id="connection" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Connection</label>
                <field id="engine" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Search Engine</label>
                    <source_model>Magento\Search\Model\Adminhtml\System\Config\Source\Engine</source_model>
                </field>
                <field id="server_hostname" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Elasticsearch Server Hostname</label>
                    <depends>
                        <field id="engine">amasty_elastic</field>
                    </depends>
                </field>
                <field id="server_port" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Elasticsearch Server Port</label>
                    <validate>validate-greater-than-zero</validate>
                    <depends>
                        <field id="engine">amasty_elastic</field>
                    </depends>
                </field>
                <field id="index_prefix" translate="label" type="text" sortOrder="63" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Elasticsearch Index Prefix</label>
                    <depends>
                        <field id="engine">amasty_elastic</field>
                    </depends>
                </field>
                <field id="enable_auth" translate="label" type="select" sortOrder="64" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Enable Elasticsearch HTTP Auth</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <depends>
                        <field id="engine">amasty_elastic</field>
                    </depends>
                </field>
                <field id="username" translate="label" type="text" sortOrder="65" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Elasticsearch HTTP Username</label>
                    <depends>
                        <field id="enable_auth">1</field>
                    </depends>
                </field>
                <field id="password" translate="label" type="password" sortOrder="66" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Elasticsearch HTTP Password</label>
                    <depends>
                        <field id="enable_auth">1</field>
                    </depends>
                </field>
                <field id="server_timeout" translate="label" type="text" sortOrder="67" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Elasticsearch Server Timeout</label>
                    <validate>validate-greater-than-zero</validate>
                    <depends>
                        <field id="engine">amasty_elastic</field>
                    </depends>
                </field>
                <field id="test_connect" translate="button_label" sortOrder="68" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label/>
                    <button_label>Test Connection</button_label>
                    <frontend_model>Amasty\ElasticSearch\Block\Adminhtml\System\Config\ConnectionChecker</frontend_model>
                    <depends>
                        <field id="engine">amasty_elastic</field>
                    </depends>
                </field>
            </group>
            <group id="catalog" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0" >
                <label>Catalog</label>
                <field id="wildcard_mode" translate="label,comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Wildcard Type</label>
                    <comment>Specify the type of the autocomplete suggestion - the part of a word which will be auto-completed. Shoppers can input a half-finished word and get a relevant result.</comment>
                    <source_model>Amasty\ElasticSearch\Model\Source\WildcardMode</source_model>
                </field>
                <field id="wildcard_symbols" translate="label,comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
                    <label>Enable Wildcard After</label>
                    <validate>validate-greater-than-zero</validate>
                    <comment>Specify a number of symbols to apply autocomplete suggestion after.</comment>
                </field>
                <field id="spellcorrection_symbols" translate="label,comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
                    <label>Enable Spell Correction After</label>
                    <validate>validate-greater-than-zero</validate>
                    <comment>Specify a number of symbols to apply spell correction after.</comment>
                </field>
                <field id="max_items" translate="label" type="text" sortOrder="998" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
                    <label>Max Number of Search Results</label>
                    <comment>Specify the maximum number of items in the search results. Set 0 to use default Magento limitation (10000 items).</comment>
                    <validate>validate-zero-or-greater</validate>
                </field>
                <field id="long_tail" translate="label" type="select" sortOrder="1000" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Allow Special Characters</label>
                    <comment>Useful when customer uses a highly specific search phrase and words that contain slashes, hyphens, dashes or any other non-alphabetic symbols.</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <backend_model>Amasty\ElasticSearch\Model\Adminhtml\System\Config\Backend\LongTail</backend_model>
                </field>
                <field id="query_settings" translate="label,comment" sortOrder="1010" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Search Query Settings</label>
                    <frontend_model>Amasty\ElasticSearch\Block\Adminhtml\Form\Field\QuerySettings</frontend_model>
                    <backend_model>Amasty\ElasticSearch\Model\Config\QuerySettings</backend_model>
                    <comment><![CDATA[Specify the search type preferences for each product attribute. Please consult the <a href="https://amasty.com/docs/doku.php?id=magento_2:elastic_search#advanced_query_settings">user guide</a>.]]></comment>
                </field>
            </group>
        </section>
    </system>
</config>
1
  • 1 exception(s): Exception #0 (Exception): Notice: Undefined index: id in /home/petyol/public_html/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 72 Commented Jun 7, 2021 at 14:42

1 Answer 1

2

Did you installed the amasty_elastic as a package in app/code.I was also faced similar kind of issue. Installing amasty_elasticsearch with composer solved the issue for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.