Domanda

I just updated my magento from 2.4.0 to 2.4.1 via composer.

But now bin/magento does not work anymore. If I execute php bin/magento list then nothing happens.

I figured out that a error_log file was created in the bin/ folder where the magento file is located.

It has this content:

[02-Dec-2020 14:05:30 UTC] PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\Theme\Model\Theme\StoreThemesResolverInterface in /home/company/redesign.company.de/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
Stack trace:
#0 /home/company/redesign.company.de/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Theme\\M...')
#1 /home/company/redesign.company.de/vendor/magento/module-theme/Model/Config/Customization.php(75): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Theme\\M...')
#2 /home/company/redesign.company.de/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Theme\Model\Config\Customization->__construct(Object(Magento\Store\Model\StoreManager\Interceptor), Object(Magento\Theme\Model\View\Design\Proxy), Object(Magento\Theme\Model\Theme\ThemeProvider), NULL)
#3 /home/company/redesign.company.de/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(6 in /home/company/redesign.company.de/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50
È stato utile?

Soluzione

I figured out that the frontend also throws an error. I had to flush the redis cache to make it work, even though redis is not even setup for that project but for another one.

redis-cli flushall

Altri suggerimenti

I'm not sure if this is related or not; but recently composer updated his version and it's not compatible with magento latest version.

Basicaly, in my docker I had to change

curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin \

into

curl -sS 'https://getcomposer.org/installer' | php -- --version=1.10.16 --filename=composer --install-dir=/usr/local/bin \
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top