Frontend Error After Upgrade to Magento 2.4.7 – How to Fix

magento2.4.7

After performing a test upgrade from Magento Open Source 2.4.6 to 2.4.7 the frontend does not load returning the error

Error: Cannot instantiate interface Magento\Csp\Model\Collector\MergerInterface in /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121

setup:upgrade completes without errors

setup:di:compile completes without errors

No further errors found in log files

Backend / Administration is working fine

Best Answer

This issue is occurring because you disabled or removed the Magento_Csp module, while the Magento_Paypal in Magento 2.4.7 requires the Magento_Csp module. To resolve the issue, you will need to enable or reinstall the Magento_Csp module. Otherwise, you will need to override multiple files in the Magento_Paypal module.