1

I'm using Magento 2 CE Version 2.1.0 on WAMP.

When we receive below kind of error

a:4:{i:0;s:414:"Recoverable Error: Argument 6 passed to Magento\Catalog\Controller\Adminhtml\Product\Save::__construct() must be an instance of Magento\Catalog\Api\ProductRepositoryInterface, none given, called in /var/www/magento2/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php

Will do follow steps

  • Remove module folder from var/generation
  • Run magento setup:upgrade, magento setup:di:compile, magento cache:flush Commands

At the time of magento setup:di:compile

Application Code Generator takes so much time.

In overall process takes approximately 10 minutes to solve above error. Is there any better way to solve it & saving time?

2
  • @KhoaTruongDinh Let me check & gives u update
    – Jackson
    Sep 6, 2016 at 1:13
  • 1
    How about your current issue? Sep 14, 2016 at 16:20

1 Answer 1

2

From my experience:

We should work on developer mode when developing. This is because auto-generated classes (Proxy, Factory, Interceptor) will be generated on the fly. DI compile doesn't need in this mode, so we don't need to run it again and again.

And then, we need to delete var/generation and clear cache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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