Skip to main content
added 598 characters in body
Source Link
MgtWizards
  • 533
  • 4
  • 10

One easy way to debug is: browse and open vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php

change

public function setElements(array $elements, $scope)
    {
        $this->_elements = $elements;
        $this->_scope = $scope;
        if (count($elements)) {
            $lastElement = end($elements);
            $this->_lastId = $lastElement['id'];
        }
    }

to

public function setElements(array $elements, $scope)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/config_debug.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        
        $this->_elements = $elements;
        $this->_scope = $scope;
        
        if (count($elements)) {
            $lastElement = end($elements);

            // Log last Element
            $logger->info($lastElement);

            $this->_lastId = $lastElement['id'];
        }
    }

or for magento +2.4

public function setElements(array $elements, $scope)
    {
        $writer = new \Zend_Log_Writer_Stream(BP . '/var/log/config_debug.log');
        $logger = new \Zend_Log();
        $logger->addWriter($writer);
        
        $this->_elements = $elements;
        $this->_scope = $scope;
        
        if (count($elements)) {
            $lastElement = end($elements);

            // Log last Element
            $logger->info($lastElement);

            $this->_lastId = $lastElement['id'];
        }
    }

Reload browser configuration window and see once again the error.

Check var/log/config_debug.log file.

Go to very bottom of the file and see which module failed, where it stopped.

That's the one causing your issues.

Don't forget to rollback your changes once fixed.

One easy way to debug is: browse and open vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php

change

public function setElements(array $elements, $scope)
    {
        $this->_elements = $elements;
        $this->_scope = $scope;
        if (count($elements)) {
            $lastElement = end($elements);
            $this->_lastId = $lastElement['id'];
        }
    }

to

public function setElements(array $elements, $scope)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/config_debug.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        
        $this->_elements = $elements;
        $this->_scope = $scope;
        
        if (count($elements)) {
            $lastElement = end($elements);

            // Log last Element
            $logger->info($lastElement);

            $this->_lastId = $lastElement['id'];
        }
    }

Reload browser configuration window and see once again the error.

Check var/log/config_debug.log file.

Go to very bottom of the file and see which module failed, where it stopped.

That's the one causing your issues.

Don't forget to rollback your changes once fixed.

One easy way to debug is: browse and open vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php

change

public function setElements(array $elements, $scope)
    {
        $this->_elements = $elements;
        $this->_scope = $scope;
        if (count($elements)) {
            $lastElement = end($elements);
            $this->_lastId = $lastElement['id'];
        }
    }

to

public function setElements(array $elements, $scope)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/config_debug.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        
        $this->_elements = $elements;
        $this->_scope = $scope;
        
        if (count($elements)) {
            $lastElement = end($elements);

            // Log last Element
            $logger->info($lastElement);

            $this->_lastId = $lastElement['id'];
        }
    }

or for magento +2.4

public function setElements(array $elements, $scope)
    {
        $writer = new \Zend_Log_Writer_Stream(BP . '/var/log/config_debug.log');
        $logger = new \Zend_Log();
        $logger->addWriter($writer);
        
        $this->_elements = $elements;
        $this->_scope = $scope;
        
        if (count($elements)) {
            $lastElement = end($elements);

            // Log last Element
            $logger->info($lastElement);

            $this->_lastId = $lastElement['id'];
        }
    }

Reload browser configuration window and see once again the error.

Check var/log/config_debug.log file.

Go to very bottom of the file and see which module failed, where it stopped.

That's the one causing your issues.

Don't forget to rollback your changes once fixed.

Edited the script because it makes no sense to show all elements, you only want to show the last element (he even wrote it in his answer).
Source Link

One easy way to debug is: browse and open vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php

change

public function setElements(array $elements, $scope)
    {
        $this->_elements = $elements;
        $this->_scope = $scope;
        if (count($elements)) {
            $lastElement = end($elements);
            $this->_lastId = $lastElement['id'];
        }
    }

to

public function setElements(array $elements, $scope)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/config_debug.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        
        $this->_elements = $elements;
        $this->_scope = $scope;
        
        $logger->infoif (count($elements);) {
            $lastElement = end($elements);

        if (count($elements)) {
  // Log last Element
          $lastElement = end$logger->info($elements$lastElement); 

            $this->_lastId = $lastElement['id'];
        }
    }

Reload browser configuration window and see once again the error.

Check var/log/config_debug.log file.

Go to very bottom of the file and see which module failed, where it stopped.

That's the one causing your issues.

Don't forget to rollback your changes once fixed.

One easy way to debug is: browse and open vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php

change

public function setElements(array $elements, $scope)
    {
        $this->_elements = $elements;
        $this->_scope = $scope;
        if (count($elements)) {
            $lastElement = end($elements);
            $this->_lastId = $lastElement['id'];
        }
    }

to

public function setElements(array $elements, $scope)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/config_debug.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        
        $this->_elements = $elements;
        $this->_scope = $scope;
        
        $logger->info($elements);
        
        if (count($elements)) {
            $lastElement = end($elements);
            $this->_lastId = $lastElement['id'];
        }
    }

Reload browser configuration window and see once again the error.

Check var/log/config_debug.log file.

Go to very bottom of the file and see which module failed, where it stopped.

That's the one causing your issues.

Don't forget to rollback your changes once fixed.

One easy way to debug is: browse and open vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php

change

public function setElements(array $elements, $scope)
    {
        $this->_elements = $elements;
        $this->_scope = $scope;
        if (count($elements)) {
            $lastElement = end($elements);
            $this->_lastId = $lastElement['id'];
        }
    }

to

public function setElements(array $elements, $scope)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/config_debug.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        
        $this->_elements = $elements;
        $this->_scope = $scope;
        
        if (count($elements)) {
            $lastElement = end($elements);

            // Log last Element
            $logger->info($lastElement); 

            $this->_lastId = $lastElement['id'];
        }
    }

Reload browser configuration window and see once again the error.

Check var/log/config_debug.log file.

Go to very bottom of the file and see which module failed, where it stopped.

That's the one causing your issues.

Don't forget to rollback your changes once fixed.

Source Link
MgtWizards
  • 533
  • 4
  • 10

One easy way to debug is: browse and open vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php

change

public function setElements(array $elements, $scope)
    {
        $this->_elements = $elements;
        $this->_scope = $scope;
        if (count($elements)) {
            $lastElement = end($elements);
            $this->_lastId = $lastElement['id'];
        }
    }

to

public function setElements(array $elements, $scope)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/config_debug.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        
        $this->_elements = $elements;
        $this->_scope = $scope;
        
        $logger->info($elements);
        
        if (count($elements)) {
            $lastElement = end($elements);
            $this->_lastId = $lastElement['id'];
        }
    }

Reload browser configuration window and see once again the error.

Check var/log/config_debug.log file.

Go to very bottom of the file and see which module failed, where it stopped.

That's the one causing your issues.

Don't forget to rollback your changes once fixed.