Closed tzyganu closed 2 years ago
Thanks for raising this issue. We'll have a look as soon as we can. @websharp maybe you have an opinion on this matter :)
@shochdoerfer I can have a look, and think of the workflow if it not just a Redirect directive. Thank you @tzyganu for reporting.
@tzyganu I added your provided solution to the master, would you mind to check, if this works for you?
@websharp thanks for the fix. Will try it as soon as possible
I assume the issue is fixed already. I could not reproduce it with the dev-master version of this module and Magento 2.4.4. If you feel there's more we need to fix, let us know.
The next version of the module will be released in next few days.
Preconditions
customer/startup/redirect_dashboard
config setting is 0.Steps to reproduce
Expected result
Actual result
setUrl
onMagento\Framework\Controller\Result\Forward\Interceptor
Additional info
On the class Magento\Wishlist\Controller\AbstractIndex there is a plugin
Magento\Wishlist\Controller\Index\Plugin
that sets some redirect data in session if the customer is not logged inThe LoginPost controller returns
$this->accountRedirect->getRedirect();
(which is the second parameter to the AfterLoginPlugin::afterExecute method in this module).In tthe above mentioned
getRedirect
method, in casethis->session->getBeforeRequestParams()
returns something, then an instance of\Magento\Framework\Controller\Result\Forward
is returned and this causes an error in your plugin class because theForward
class does nto have a method calledsetUrl
.What I did to overcome this is to replace
$resultRedirect->setUrl($targetUrl);
in your plugin class withThis seems to solve the problem but I'm not sure it's the way to go.