2

\Magento\Backend\Model\View\Result\RedirectFactory already exists in context object. How to solve this problem in magento 2?

  • Did you write a custom module with a controller? – Oshan Apr 25 '17 at 6:23
2

Use

$context->getRedirectFactory();
1

You may have injected \Magento\Backend\Model\View\Result\RedirectFactory this class which is already available in your injected class so it shows such an error

you can get the RedirectFactory using context object

$this->redirectFactory =  $context->getRedirectFactory();

and then you can use your redirectFactory as you were.

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.