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?

Manashvi Birla
8,8739 gold badges29 silver badges53 bronze badges
asked Aug 30, 2016 at 10:40
2
  • @KhoaTruongDinh Let me check & gives u update Commented Sep 6, 2016 at 1:13
  • 1
    How about your current issue? Commented 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.

answered Aug 30, 2016 at 10:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.