-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Backport][2.2] Alternative fix for Multi Store Emails issue, Fix Async Emails issues, Fix Multiple Email issues #18472
[Backport][2.2] Alternative fix for Multi Store Emails issue, Fix Async Emails issues, Fix Multiple Email issues #18472
Conversation
Hi @sidolov, |
@gwharton is it really backport of some fix from 2.3-develop branch? |
The same fault is present in 2.3. Magento is prioritising 2.3 now as i guess 2.3.0 is iminent. There is a new pr for 2.3 and i labelled this one backport. Hopefully they will make the decision on the 2.3 pr and this one will follow without discussion. |
Hi @ihor-sviziev , @gwharton , we discussed this case with @buskamuza recently. We still not allowed to add new parameters to public methods, the best way is to deprecate the old method and create the new one, like |
ok, someone else will have to pick this one up. |
TODO : Rest of Magento codebase still uses deprecated setFrom
lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php
Outdated
Show resolved
Hide resolved
lib/internal/Magento/Framework/Mail/Template/TransportBuilderByStore.php
Outdated
Show resolved
Hide resolved
Fix small issue
Just informational, but there is official Magento documentation around how to use the Although it doesn't go over complex PR's like this one which span multiple modules, so you need to split out the diff in multiple diff files, one per module ( |
Ok thanks @hostep and @ihor-sviziev I tried for hours yesterday and did manage to figure out splitting to two modules. Still getting failure on the framework one due to some unexpected ending. I'll have to look more today. I still don't even know if this PR will fix my issue for sure yet. |
I could not get the framework diff to apply, so I've just copied and pasted all the 6 files from raw to my magento and now get this error on testing an email send Zend\Mail\Transport\Smtp transport expects either a Sender or at least one From address in the Message; none provided Really need a fix for this, I'm a merchant running a store and sending out generic looking emails now. |
You should only copy the changes, not the entire raw file. By copying the entire raw file, you have effectively overwritten your 2.2.7 files with the 2.2-develop files which may contain other changes not compatible with the rest of 2.2.7. Just go by the diff, if the line is red (prefixed with a "-"), it is removed, if the line is green (prefixed with a "+"), it is added. The white lines are not changed, and are there for you to locate the lines that have changed. If you just want to get it to work, you could ignore the files with Test in the filename as they are not needed. Be aware if this PR doesnt make it into 2.2.8 then when you upgrade to 2.2.8 you will need to make these changes again. |
I'm on 2.3 now. Are these changes still compatible if I go through the
trouble.
…On Tue, Mar 5, 2019 at 12:31 PM gwharton ***@***.***> wrote:
You should only copy the changes, not the entire raw file. By copying the
entire raw file, you have effectively overwritten your 2.2.7 files with the
2.2-develop files which may contain other changes not compatible with the
rest of 2.2.7.
Just go by the diff, if the line is red (prefixed with a "-"), it is
removed, if the line is green (prefixed with a "+"), it is added. The white
lines are not changed, and are there for you to locate the lines that have
changed.
If you just want to get it to work, you could ignore the files with Test
in the filename as they are not needed.
Be aware if this PR doesnt make it into 2.2.8 then when you upgrade to
2.2.8 you will need to make these changes again.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18472 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACQbJXGSSjnz-rkto5P2pFfeAXsCH0cIks5vTqhIgaJpZM4XNfnI>
.
|
So shouldn't copy of raw 2.3 develop files do the trick?
…On Tue, Mar 5, 2019, 12:40 PM gwharton ***@***.***> wrote:
PR #18471 <#18471> is the
equivalent fix for 2.3
This has already been merged into 2.3-develop and will be included in
release 2.3.1
You need to revert what you have done, and make the changes according to
PR #18471 <#18471>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18472 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACQbJRJWnn9h3wCwYZzMoXpzF2zdUzTwks5vTqwFgaJpZM4XNfnI>
.
|
Don't copy raw files from develop into a release version........ full stop. You're asking for trouble as the files may not be compatible. If you are running 2.3.0 then revert your changes by copying over the files from YOUR release to get you back to the originals. Then if you must apply the PR manually, do so by only making the changes identified in the diff. |
Ok. Good to know. I'm only trying on dev first, but glad to know about not
copying the raw files.
…On Tue, Mar 5, 2019, 12:57 PM gwharton ***@***.***> wrote:
Don't copy raw files from develop into a release version........ full
stop. You're asking for trouble as the files may not be compatible.
If you are running 2.3.0 then revert your changes by copying over the
files from YOUR release to get you back to the originals. Then if you must
apply the PR manually, do so by only making the changes identified in the
diff.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18472 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACQbJTsAJpy78tJtWJ1dzC2fuPnMNMbKks5vTrAEgaJpZM4XNfnI>
.
|
Hi @gwharton, thank you for your contribution! |
…ssue, Fix Async Emails issues, Fix Multiple Email issues #18472
I am seeing this for a 2.3.0 site still. From what I can tell 2.3 contains the patch. So not sure why it is not working. |
2.3.1 i believe got this. Not 2.3.0. |
thanks |
Has anyone figured out how to apply this patch to a composer 2.2.7 install? |
@LandonL82, just make the following string replacements in your text editor before applying the patch: app/code/Magento/Sales -> vendor/magento/module-sales |
@LandonL82 |
@gwharton Good to have the backward compatible with TransportBuilder.php on <=2.2.6 on your PR |
Yeah. I never got this patch working for me unfortunately either. I'm using
an smtp module that the developer did a second check on the send from to
temporarily fix it.
It's the free mage plaza one if you need it. Just open a ticket with them
and they'll add the same for you I'm sure
…On Thu, Jun 13, 2019, 5:42 AM farhadfrz ***@***.***> wrote:
I applied the changes to Magento 2.2.8, but still the admin emails are
sent from default email!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18472?email_source=notifications&email_token=AASBWJO5AWCE3GQCWSYKHTTP2II7FA5CNFSM4FZV7HEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXTEITQ#issuecomment-501630030>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASBWJNBC7ADW3X6DVNM2MDP2II7FANCNFSM4FZV7HEA>
.
|
On 2.2.6 you should exclude Mail.php from patch because it was not implemented some missing functions. Actually the Mail.php was changed since 2.2.7 |
Still got the problem in 2.3.1 for every payment method except Paypal and Amazon Pay.
Regards, Loqic |
Hi @Loqic2633, Thank you! |
This PR replaces PR #16461 as for some reason, that PR has become detached from my repo and I don't think it will merge properly.
Original Pull Request
#18471
Description
This PR removes the previously introduced transportBuilderByStore class that was introduced in 2.2.4 to fix issue #11740 as this implementation caused unwanted regression/bug when sending multiple emails/async emails.
Fixed Issues (if relevant)
Manual testing scenarios
Scenareo 1
Scenareo 2
Contribution checklist