-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prepareForward not working in Observer.php #66
Comments
I suggest the following change into the code: Replace
with
I have tested and it is working as expected. |
It shouldn't work 🤔 😂 Because Magento has still a bug in their
needs to be
I'm heavily wondering why this works. But imho is that the way to go. Extend |
@addison74 Thanks fir digging into this! |
I checked a lot of posts over the years related to prepareForward issue. In most of the cases the solution was the one I mentioned in the first post, but I checked the core code to understand what means Forward and Redirect. Probably it worked in my case without changing the core code because there were no arguments in the method. I will check if OpenMage team has fixed the issue you mentioned. |
Yes they did 😅 If you are using OpenMage, this explains the working <3 |
You guessed right. I made the change in OpenMage. It is a blessing the M1 project is led before that kind team. |
You can make a change in the code without extending any class. If it is Magento by default then you use the code from the first post (or other more elegant). If it is OpenMage then the redirection made through a line of code works like a charm. |
In order to generate a SPAM event in frontend fill up honeyspam input text box with a value and an email address. Check the URL of the page after redirection. The extension redirects to /newsletter/subscriber/new instead of /honeyspam/error. I got the same results testing with Magento 1.9.2.4, 1.3,9.10, 1.9.4.5 and OpenMage 20.0.4.
This issue is coming from prepareForward method used in Observer.php file. Here is one example:
I did a change in the code as follows in order to get honeyspam URL:
Any thougths?
The text was updated successfully, but these errors were encountered: