redchamps / clean-admin-menu

Magento 2 Extension to cleanup admin menu and Store > Configuration area by arranging third party extension items.
https://redchamps.com
MIT License
141 stars 13 forks source link

Notice: Undefined index: in vendor/redchamps/module-clean-admin-menu/Model/RuleFactory.php on line 35 #28

Closed AndrewRMillar closed 2 years ago

AndrewRMillar commented 2 years ago

When I install the module using I get an exception. Using magento 2.3.7-p1

composer require redchamps/module-clean-admin-menu
bin/magento set:up

Installed version is 1.1.3

1 exception(s):
Exception #0 (Exception): Notice: Undefined index:  in /data/a4h/magento2/vendor/redchamps/module-clean-admin-menu/Model/RuleFactory.php on line 35

Exception #0 (Exception): Notice: Undefined index:  in /data/a4h/magento2/vendor/redchamps/module-clean-admin-menu/Model/RuleFactory.php on line 35
<pre>#1 RedChamps\CleanMenu\Model\RuleFactory->create() called at [vendor/redchamps/module-clean-admin-menu/Model/IsAllowedStrategy.php:46]
#2 RedChamps\CleanMenu\Model\IsAllowedStrategy->isAllowed() called at [vendor/redchamps/module-clean-admin-menu/Model/Config/Structure/Data.php:43]
#3 RedChamps\CleanMenu\Model\Config\Structure\Data->get() called at [generated/code/RedChamps/CleanMenu/Model/Config/Structure/Data/Interceptor.php:24]
#4 RedChamps\CleanMenu\Model\Config\Structure\Data\Interceptor->get() called at [vendor/magento/module-config/Model/Config/Structure.php:127]
#5 Magento\Config\Model\Config\Structure->__construct() called at [generated/code/Magento/Config/Model/Config/Structure/Interceptor.php:14]
#6 Magento\Config\Model\Config\Structure\Interceptor->__construct() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121]
#7 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:66]
#8 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#9 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:167]
#10 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:273]
#11 Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:236]
#12 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34]
#13 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59]
#14 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#15 Magento\Framework\ObjectManager\ObjectManager->create() called at [vendor/magento/framework/App/ActionFactory.php:44]
#16 Magento\Framework\App\ActionFactory->create() called at [vendor/magento/framework/App/Router/Base.php:306]
#17 Magento\Framework\App\Router\Base->matchAction() called at [vendor/magento/framework/App/Router/Base.php:167]
#18 Magento\Framework\App\Router\Base->match() called at [vendor/magento/framework/App/FrontController.php:115]
#19 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#20 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#21 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#22 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#23 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#24 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#25 Magento\Framework\App\Http\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#26 Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/msp/adminrestriction/Plugin/AppInterfacePlugin.php:134]
#27 MSP\AdminRestriction\Plugin\AppInterfacePlugin->aroundLaunch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#28 Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/justbetter/magento2-sentry/Plugin/GlobalExceptionCatcher.php:43]
#29 JustBetter\Sentry\Plugin\GlobalExceptionCatcher->aroundLaunch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#30 Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#31 Magento\Framework\App\Http\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:26]
#32 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#33 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:40]
</pre>
rav-redchamps commented 2 years ago

Please flush Magento cache using below command

php bin/magento cache:flush

& confirm if that solves the problem.

rav-redchamps commented 2 years ago

If this command still triggers error then try removing cache directory directly

rm -rf var/cache

AndrewRMillar commented 2 years ago

@rav-redchamps Thanks for your reply. I was under the impression that setup:upgrade cleared the cache, that is why I did not perform that step. But apparently that is an essential step for this module. After flushing the cache the issue was resolved in my local development environment.

I can't imagine that flushing the cache is not part of our deploy pipeline. I will test it in a review deployment. And get back to you, when this step resolves this issue on review I will close this issue.

rav-redchamps commented 2 years ago

@AndrewRMillar I hope this issue is resolved, so closing it. Please feel free to reopen if you are still facing it.