On a bone stock 2.4.3 install I added a single Product. I then cleared the cache from Settings, but upon page reload I got this error:
1 exception(s): Exception #0 (Exception): Notice: Undefined index: in /var/www/pix/vendor/magento/framework/Module/ModuleList/Loader.php on line 99 Exception #0 (Exception): Notice: Undefined index: in /var/www/pix/vendor/magento/framework/Module/ModuleList/Loader.php on line 99 <pre>#1 Magento\Framework\Module\ModuleList\Loader->load() called at [vendor/magento/framework/Module/ModuleList.php:72] #2 Magento\Framework\Module\ModuleList->getAll() called at [vendor/magento/framework/Module/ModuleList.php:91] #3 Magento\Framework\Module\ModuleList->getOne() called at [vendor/magento/framework/Module/DbVersionInfo.php:144] #4 Magento\Framework\Module\DbVersionInfo->isModuleVersionEqual() called at [vendor/magento/framework/Module/DbVersionInfo.php:59] #5 Magento\Framework\Module\DbVersionInfo->isSchemaUpToDate() called at [vendor/magento/framework/Module/DbVersionInfo.php:103] #6 Magento\Framework\Module\DbVersionInfo->getDbVersionErrors() called at [vendor/magento/framework/Module/Plugin/DbStatusValidator.php:119] #7 Magento\Framework\Module\Plugin\DbStatusValidator->getGroupedDbVersionErrors() called at [vendor/magento/framework/Module/Plugin/DbStatusValidator.php:53] #8 Magento\Framework\Module\Plugin\DbStatusValidator->beforeDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:121] #9 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #10 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23] #11 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116] #12 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:264] #13 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:29] </pre>
Thinking that it is related to the cache I cleared all caches and indexes via bin/magento (yes, I know that the PHP error message isn't referring to those indexes), but the error persists. Debugging, I see that the vendor/magento/framework/Module/ModuleList/Loader.php's method load() runs this code:
$data = $this->converter->convert($this->parser->getDom());
$name = key($data); if (!isset($excludeSet[$name])) {
$result[$name] = $data[$name];
}
After 343 iterations the last valid $name is Magento_ComposerRootUpdatePlugin, the iteration after that returns $name as null. Thus, the reading of $data[$name] throws the exception seen above.
Hours of trying to debug why convert()-getDom() is returning null have brought me here. )) Why might this be happening? What can I do to repair this install?
Thank you.
Solved! Go to Solution.
Resolution: The problem was a typo in the XML of the next iteration. Probably a consequence of thinking that I'm proficient in VIM. The module whose XML was invalid was not yet committed to git, so I did not notice the change.
Lesson: Commit early, commit often.
Resolution: The problem was a typo in the XML of the next iteration. Probably a consequence of thinking that I'm proficient in VIM. The module whose XML was invalid was not yet committed to git, so I did not notice the change.
Lesson: Commit early, commit often.