0

I upgraded Magento from 2.3.4 to 2.4

After upgrade,it's impossible to open stores ---> configuration I got Exception:

1 exception(s):
Exception #0 (Exception): Notice: Undefined index: id in /home/shop/domains/domain.pl/public_html/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63

Exception #0 (Exception): Notice: Undefined index: id in /home/shop/domains/domain.pl/public_html/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
<pre>#1 Magento\Config\Model\Config\Structure\Element\Iterator->setElements(array('magentech' => array('id' => 'magentech', 'translate' => 'label', 'sortOrder' => 1, 'label' => 'Magentech.com', '_elementType' => 'tab', 'children' => array('market' => array('id' => 'market', 'translate' => 'label', 'type' => 'text', 'sortOrder' => 1, 'showInDefault' => 1, 'showInWebsite' => 1, 'showInStore' => 1, 'class' => 'separator-top', 'label' => 'SM Market', 'tab' => 'magentech', 'resource' => 'Sm_Market::confi...', 'children' => array('general' => array('id' => 'general', 'translate' => 'label', 'type' => 'text', 'sortOrder' => 1, 'showInDefault' => 1, 'showInWebsite' => 1, 'showInStore' => 1, 'label' => 'General Options', 'children' => array('theme_color' => array('id' => 'theme_color', 'translate' => 'label', 'type' => 'text', 'sortOrder' => 5, 'showInDefault' => 1, 'showInWebsite' => 1, 'showInStore' => 1, 'label' => 'Theme Color', 'frontend_model' => 'Sm\Market\Block\...', '_elementType' => 'field', 'path' => 'market/general'), 'heading_bodyfont' => array('id' => 'heading_bodyfont', 'translate' => 'label', 'type' => 'text', 'sortOrder' => 10, 'showInDefault' => 1, 'showInWebsite' => 1, 'showInStore' => 1, 'label' => 'Body Font', 'frontend_model' => 'Magento\Config\B...', '_elementType' => 'field', 'path' => 'market/general'), 'body_font' => array('id' => 'body_font', 'translate' => 'label', 'type' => 'select', 'sortOrder' => 15, 'showInDefault' => 1, 'showInWebsite' => 1, 'showInStore' => 1, 'label' => 'Main Font', 'source_model' => 'Sm\Market\Model\...', '_elementType' => 'field', 'path' => 'market/general'), 'body_google_font' => array('id' => 'body_google_font', 'translate' => 'label', 'type' => 'select', 'sortOrder' => 20, 'showInDefault' => 1, 'showInWebsite' => 1, 'showInStore' => 1, 'label' => 'Google Font Name', 'source_model' => 'Sm\Market\Model\...', 'depends' => array('fields' => array('body_font' => array('id' => 'market/general/b...', 'value' => 'google_font', '_elementType' => 'field', 'dependPath' => array('market', 'general', 'body_font')))), '_elementType' => 'field', 'path' => 'market/general'), 'font_size' => array('id' => 'font_size', 'translate' => 'label', 'type' => 'select', 'sortOrder' => 25, 'showInDefault' => 1, 'showInWebsite' => 1, 'showInStore' => 1, 'label' => 'Font Size', 'source_model' => 'Sm\Market\Model\...', '_elementType' => 'field', 'path' => 'market/general'), 'body_link_color' => array('id' => 

Iterator.php on line 63

/**
 * Set element data
 *
 * @param array $elements
 * @param string $scope
 * @return void
 */
public function setElements(array $elements, $scope)
{
    $this->_elements = $elements;
    $this->_scope = $scope;
    if (count($elements)) {
        $lastElement = end($elements);
        $this->_lastId = $lastElement['id'];
    }
}
7
  • check your php version
    – Rk Rathod
    Dec 29 '20 at 11:27
  • I change to 7.3 from 7.4 but still the same issue. Should I upgrade again with 7.3 ?
    – Sylvester
    Dec 29 '20 at 11:47
  • after change make sure you restart php
    – Rk Rathod
    Dec 29 '20 at 12:18
  • Unfortunately, this did not solve the problem. PHP restarted. I gave s: up and s: d: c again still the same issue.
    – Sylvester
    Dec 29 '20 at 19:51
  • It looks like you use sm market theme that is causing this issue. First I would check updates and doc of this theme.
    – BartZalas
    Dec 31 '20 at 0:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.