Exception.log file Error:
{"exception":"[object] (ReflectionException(code: -1): Class Magento\Framework\App\Http\Interceptor does not exist
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityException.log file Error:
{"exception":"[object] (ReflectionException(code: -1): Class Magento\Framework\App\Http\Interceptor does not exist
The Interceptor file is deleted. Need to recreate Interceptor
Run di:compile
command
php bin/magento setup:di:compile
This occurs Because you can inject Magento\Framework\App\Http
in any our class
try following steps
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:Deploy -f
chmod -R 777 var/ generated/
find var/ -type d -exec chmod 775 {} + && find var/ -type f -exec chmod 665 {} +
(repeated for the generated dir also) that way you set the executable bit on the directories, and the read write permission for the user and group on the files, without wholesale blanketing everything with executable bits.
Mar 30, 2021 at 20:25
chmod -R 777 ...
on a production server if it could be at all avoided.
Jul 19, 2021 at 17:50
An interceptor may also be missing if its parent class' constructor fails for some reason.
An example of this is when you override a class, but your override's constructor fails due to a bad class reference in the constructor arguments or for some other reason.
[Run di:compile command]
php bin/magento setup:di:compile
[and flush the cache]
php bin/magento cache:flush
For me the problem was that I missed the backslash when defining construct function arguments:
public function __construct(
Magento\Framework\App\Action\Context $context
) {
was instead of
public function __construct(
\Magento\Framework\App\Action\Context $context
) {