@@ -44,10 +44,6 @@ class MassUpdateProductAttribute
44
44
*/
45
45
private $ attributeHelper ;
46
46
47
- /**
48
- * @var \Magento\Backend\Model\View\Result\Redirect
49
- */
50
- private $ redirectFactory ;
51
47
/**
52
48
* @var \Magento\Framework\Message\ManagerInterface
53
49
*/
@@ -60,7 +56,6 @@ class MassUpdateProductAttribute
60
56
* @param \Magento\CatalogInventory\Api\StockItemRepositoryInterface $stockItemRepository
61
57
* @param \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration
62
58
* @param \Magento\Catalog\Helper\Product\Edit\Action\Attribute $attributeHelper
63
- * @param \Magento\Backend\Model\View\Result\RedirectFactory $redirectFactory
64
59
* @param \Magento\Framework\Message\ManagerInterface $messageManager
65
60
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
66
61
*/
@@ -71,7 +66,6 @@ public function __construct(
71
66
\Magento \CatalogInventory \Api \StockItemRepositoryInterface $ stockItemRepository ,
72
67
\Magento \CatalogInventory \Api \StockConfigurationInterface $ stockConfiguration ,
73
68
\Magento \Catalog \Helper \Product \Edit \Action \Attribute $ attributeHelper ,
74
- \Magento \Backend \Model \View \Result \RedirectFactory $ redirectFactory ,
75
69
\Magento \Framework \Message \ManagerInterface $ messageManager
76
70
) {
77
71
$ this ->stockIndexerProcessor = $ stockIndexerProcessor ;
@@ -80,7 +74,6 @@ public function __construct(
80
74
$ this ->stockItemRepository = $ stockItemRepository ;
81
75
$ this ->stockConfiguration = $ stockConfiguration ;
82
76
$ this ->attributeHelper = $ attributeHelper ;
83
- $ this ->redirectFactory = $ redirectFactory ;
84
77
$ this ->messageManager = $ messageManager ;
85
78
}
86
79
@@ -111,14 +104,14 @@ public function aroundExecute(Save $subject, callable $proceed)
111
104
return $ proceed ();
112
105
} catch (\Magento \Framework \Exception \LocalizedException $ e ) {
113
106
$ this ->messageManager ->addErrorMessage ($ e ->getMessage ());
107
+ return $ proceed ();
114
108
} catch (\Exception $ e ) {
115
109
$ this ->messageManager ->addExceptionMessage (
116
110
$ e ,
117
111
__ ('Something went wrong while updating the product(s) attributes. ' )
118
112
);
113
+ return $ proceed ();
119
114
}
120
-
121
- return $ this ->redirectFactory ->create ()->setPath ('catalog/product/ ' , ['_current ' => true ]);
122
115
}
123
116
124
117
/**
0 commit comments