Skip to content

Recoverable Error: Argument 6 passed to Magento\Catalog\Controller\Adminhtml\Product\Save::__construct() must be an instance of Magento\Catalog\Api\ProductRepositoryInterface, none given #2389

Closed
@Quinten

Description

@Quinten

I'm getting this error when i try to create a new product in the backend and also when i try to save an existing product. Could this be a problem in my configuration?

Full error report:

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 on line 14 and defined in /var/www/magento2/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php on line 49";i:1;s:4839:"#0 /var/www/magento2/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php(49): Magento\Framework\App\ErrorHandler->handler(4096, 'Argument 6 pass...', '/var/www/magent...', 49, Array)
#1 /var/www/magento2/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(14): Magento\Catalog\Controller\Adminhtml\Product\Save->__construct(Object(Magento\Backend\App\Action\Context), Object(Magento\Catalog\Controller\Adminhtml\Product\Builder\Interceptor), Object(Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Interceptor), Object(Magento\Catalog\Model\Product\Copier), Object(Magento\Catalog\Model\Product\TypeTransitionManager\Interceptor))
#2 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(105): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->__construct(Object(Magento\Backend\App\Action\Context), Object(Magento\Catalog\Controller\Adminhtml\Product\Builder\Interceptor), Object(Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Interceptor), Object(Magento\Catalog\Model\Product\Copier), Object(Magento\Catalog\Model\Product\TypeTransitionManager\Interceptor))
#3 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(89): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Catalog...', Array)
#4 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Catalog...', Array)
#5 /var/www/magento2/lib/internal/Magento/Framework/App/ActionFactory.php(37): Magento\Framework\ObjectManager\ObjectManager->create('Magento\Catalog...')
#6 /var/www/magento2/lib/internal/Magento/Framework/App/Router/Base.php(300): Magento\Framework\App\ActionFactory->create('Magento\Catalog...')
#7 /var/www/magento2/lib/internal/Magento/Framework/App/Router/Base.php(161): Magento\Framework\App\Router\Base->matchAction(Object(Magento\Framework\App\Request\Http), Array)
#8 /var/www/magento2/lib/internal/Magento/Framework/App/FrontController.php(50): Magento\Framework\App\Router\Base->match(Object(Magento\Framework\App\Request\Http))
#9 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#10 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)
#11 /var/www/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#12 /var/www/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#13 /var/www/magento2/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#14 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#15 /var/www/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#16 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'storeCookieVali...')
#17 /var/www/magento2/app/code/Magento/Store/Model/Plugin/StoreCookie.php(78): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#18 [internal function]: Magento\Store\Model\Plugin\StoreCookie->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#19 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
#20 /var/www/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#21 /var/www/magento2/lib/internal/Magento/Framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /var/www/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#23 /var/www/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#24 {main}";s:3:"url";s:149:"/index.php/admin/catalog/product/save/id/2/key/9fbd31748d7786d505cf506366f921dde9fa1e396c58cdb6c4b5a060245aa7cc/back/edit/active_tab/product-details/";s:11:"script_name";s:10:"/index.php";}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Format is not validGate 1 Failed. Automatic verification of issue format is failed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions