cancel
Showing results for 
Search instead for 
Did you mean: 

(exceptions) When using usual URL to login page for Magento 2

SOLVED

(exceptions) When using usual URL to login page for Magento 2

Issue when using my usual url for my websites backend  (website working fine)

 

now get this message.

1 exception(s):
Exception #0 (ReflectionException): Class Magento\Backend\Model\Auth\Interceptor does not exist

Exception #0 (ReflectionException): Class Magento\Backend\Model\Auth\Interceptor does not exist
<pre>#1 Magento\Framework\Code\Reader\ClassReader->getConstructor() called at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:54]
#2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:48]
#3 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#4 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:170]
#5 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:276]
#6 Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:239]
#7 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34]
#8 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59]
#9 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#10 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:206]
#11 Magento\Framework\ObjectManager\Factory\AbstractFactory->parseArray() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:182]
#12 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:276]
#13 Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:239]
#14 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34]
#15 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59]
#16 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#17 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/framework/App/FrontController.php:109]
#18 Magento\Framework\App\FrontController->__construct() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:14]
#19 Magento\Framework\App\FrontController\Interceptor->__construct() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121]
#20 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:66]
#21 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#22 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/framework/App/Http.php:115]
#23 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:28]
#24 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:264]
#25 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:29]
</pre>

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: (exceptions) When using usual URL to login page for Magento 2

Hello @trademe2gmc01e,

 

The error you’re seeing, ReflectionException: Class Magento\Backend\Model\Auth\Interceptor does not exist, generally indicates that Magento is unable to find a class it needs, often due to cache or code generation issues. Here are steps to resolve this issue:

 

Clear the Generated Code and Cache:

 

Remove the generated, var/cache, and var/page_cache directories. You can do this from the Magento root directory with:

 

rm -rf generated/* var/cache/* var/page_cache/*

Recompile the Magento Code:

 

Run the following commands to regenerate any missing files and classes:

 

php bin/magento setup:di:compile

php bin/magento setup:static-content:deploy –f

Flush Magento Cache:

Clear the Magento cache to ensure no old, cached data is causing conflicts:

 

php bin/magento cache:flush

Verify Permissions:

Ensure that your file and folder permissions are correctly set. Permissions issues can cause missing or inaccessible files:

 

Check for Module Conflicts:

If you recently added or updated any custom modules, they may have introduced a conflict. Disable any recently added modules one by one and test if the login page loads without the error.

 

Reindex Data:

Sometimes indexer issues can also cause unexpected errors:

After trying these steps, try accessing the backend again. If the error persists, there may be a deeper issue with the interceptor class, possibly due to a recent extension installation or a custom modification in your Magento installation.

 

If the issue is resolved, click Kudos and accept it as a solution.

View solution in original post

4 REPLIES 4

Re: (exceptions) When using usual URL to login page for Magento 2

no changes have been made on site if that helps

Re: (exceptions) When using usual URL to login page for Magento 2

Hi @trademe2gmc01e,

 

Try running following commands after changing base URL:

rm -rf generated/*
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f bin/magento cache:flush

also check files and folders permission are as per Magento standards.

Let me know the result.

I hope it helps!

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: (exceptions) When using usual URL to login page for Magento 2

The error "Class Magento\Backend\Model\Auth\Interceptor does not exist" typically occurs due to generated code or cache issues in Magento 2. To resolve it, follow these steps

  • rm -rf var/cache/* var/page_cache/* generated/code/*
  • php bin/magento setup:di:compile
  • php bin/magento cache:clean

If this solution works. Help to thumbs up my solutions

Regards!
Ajarudeen Parihar
https://www.ltshub.com

If my suggestion helped you in any way. Please give my answer a thumbs up.

Regards!
Ajarudeen Parihar
https://www.ltshub.com

Re: (exceptions) When using usual URL to login page for Magento 2

Hello @trademe2gmc01e,

 

The error you’re seeing, ReflectionException: Class Magento\Backend\Model\Auth\Interceptor does not exist, generally indicates that Magento is unable to find a class it needs, often due to cache or code generation issues. Here are steps to resolve this issue:

 

Clear the Generated Code and Cache:

 

Remove the generated, var/cache, and var/page_cache directories. You can do this from the Magento root directory with:

 

rm -rf generated/* var/cache/* var/page_cache/*

Recompile the Magento Code:

 

Run the following commands to regenerate any missing files and classes:

 

php bin/magento setup:di:compile

php bin/magento setup:static-content:deploy –f

Flush Magento Cache:

Clear the Magento cache to ensure no old, cached data is causing conflicts:

 

php bin/magento cache:flush

Verify Permissions:

Ensure that your file and folder permissions are correctly set. Permissions issues can cause missing or inaccessible files:

 

Check for Module Conflicts:

If you recently added or updated any custom modules, they may have introduced a conflict. Disable any recently added modules one by one and test if the login page loads without the error.

 

Reindex Data:

Sometimes indexer issues can also cause unexpected errors:

After trying these steps, try accessing the backend again. If the error persists, there may be a deeper issue with the interceptor class, possibly due to a recent extension installation or a custom modification in your Magento installation.

 

If the issue is resolved, click Kudos and accept it as a solution.