0

enter image description here

Class Vendor\Mymodule\Controller\Adminhtml\Allimports\Save\Interceptor does not exist

I have a custom form and when I save data this error message, how to fix it, except usage di: compile. Thank you.

7
2

Most probably there is an error in your Vendor\Mymodule\Controller\Adminhtml\Allimports\Save class.

Check the constructor for typos or non-existing dependencies.

0

If you dont want to go for di compile. Please remove the var/generation folder (For < Magento 2.2) or generated folder (For >= Magento 2.2) and do the deployment, give necessary permissions and check the output.

0

There might be a chance that you have created a function name and earlier you were not passing any argument in that function. After some changes, you passed one argument to the same function. In this case, an error will come.

So just rename that function name and again run all commands i.e. di:compile. setup:upgrade , s:s:d -f, cache:flush. It will work.

Kudos if this solution work

0

This might be happening because your class really doesn't exist or because you need to clean up your compiled files and generate them again.

Check if the class exist vendor\Mymodule\Controller\Adminhtml\Allimports\Save

Then run these commands below to make sure you have all your required composer packages installed and you regenerated the compiled files.

   composer install
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento setup:static-content:deploy -f

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.