Magento 版本 2.4.3 访问商店配置时出错

Magento ver. 2.4.3 Error While Accessing Store Configuration

提问人:Yazeed Karajeh 提问时间:10/10/2023 更新时间:10/18/2023 访问量:69

问:

使用编辑器安装了一个扩展,然后它不起作用,所以我所做的只是删除了扩展,然后我想在Magento 2仪表板中进行一些配置,然后我发现商店配置不起作用,它显示以下错误。

1 exception(s):
Exception #0 (Exception): Notice: Undefined index: id in /var/www/bmgpharmacy.com/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63

Exception #0 (Exception): Notice: Undefined index: id in /var/www/bmgpharmacy.com/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
<pre>#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/weltpixel/m2-weltpixel-backend/Plugin/Utility.php:76]
#9 WeltPixel\Backend\Plugin\Utility->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/module-backend/App/Action/Plugin/Authentication.php:143]
#11 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#12 Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#13 Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->___callPlugins() called at [generated/code/Magento/Config/Controller/Adminhtml/System/Config/Index/Interceptor.php:32]
#14 Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:245]
#15 Magento\Framework\App\FrontController->getActionResponse() called at [vendor/magento/framework/App/FrontController.php:212]
#16 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:147]
#17 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#18 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#19 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#20 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23]
#21 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#22 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#23 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:264]
#24 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:29]

我尝试执行以下步骤,但没有帮助。

- 启用开发人员模式 - 刷新缓存 - 清理缓存 -设置:升级 -setup:di:编译

php linux magento ssh 电子商务

评论


答:

1赞 Nikhil Ajani 10/10/2023 #1

当您删除任何具有配置的扩展时,会发生此错误。要解决此问题,请检查数据库中的表并删除与禁用/删除扩展相关的条目。core_config_data

谢谢

评论

0赞 Yazeed Karajeh 10/17/2023
数据库中没有与扩展相关的任何内容。
0赞 Ben Huang 10/18/2023 #2

如果确定代码没问题,可以执行以下命令清除Redis中的Magento缓存;

rm -rf generated/code/*  && rm -rf generated/metadata/* && rm -rf  pub/static/* &&  rm -rf var/cache/*  &&  rm -rf  var/composer_home/*  && rm -rf var/page_cache/*  && rm -rf var/view_preprocessed/*  && php -d memory_limit=-1 bin/magento setup:upgrade  && php -d memory_limit=-1   bin/magento setup:di:compile  && php bin/magento setup:static-content:deploy en_US -f  && php bin/magento setup:static-content:deploy zh_Hans_CN -f   && php bin/magento setup:static-content:deploy -f 

缓存可能会导致类加载异常