-
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
2.3.3 - "Send Tracking Information" not working. #25221
Comments
Hi @AndyJAllen. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @AndyJAllen do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
I worked around this problem by just replacing \vendor\magento\module-sales\view\frontend\templates\email\shipment\track.phtml with the 2.3.2 version. It had to do with this code: Which the older version just has: |
Hi @engcom-Charlie. Thank you for working on this issue.
|
Hello @AndyJAllen Thank you for contribution and collaboration! We are not able to reproduce this issue on the lates 2.3-develop branch by provided steps. Manual testing scenario:
Result: So i have to close this issue. |
I had the same problem after upgrading from 2.2.8 to 2.3.3. Your workaround worked for me. Thanks! |
I'm glad I was able to help someone. Good luck to you sir. |
I have same issue when upgrade magento 2.3.2 to 2.3.3. Shipping created with Carrier: Custom value. |
I wonder what we did different than what @engcom-Charlie did for different behavior? I copied all the framework, fedex, sales, and shipping modules from 2.3-develop and still had the issue. No custom modules that would have anything to do with the functionality. @engcom-Charlie one thing I can tell you that is different in my scenario is I use smartpost which consists of two tracking numbers. |
@AndyJAllen i tried again with smart post and two tracking numbers. Result is same: |
Oh well; not going to grind my gears over it since I worked around it. Thanks for looking into it @engcom-Charlie If I hit this again on 2.3.4 I'll dig deeper and report my findings. |
@engcom-Charlie I am having the same issue with 2.3.3. I've done a search on the 2.3 repo, Magento 2.3 repo search and can't find any reference to where the method getTrackingUrl is created?
@AndyJAllen your work around did the trick. |
Hello @aibean |
I had the same issue after upgrading from Magento 2.3.2 to 2.3.3. The workaround of @AndyJAllen helped me too. Thanks for the tip! |
Got the same problem. @AndyJAllen, thank you. |
I also have exactly the same problem. Upgraded from 2.2.8 and shipment notification is broken. WIll have to maintain a patch against core for now with the workaround by @AndyJAllen. I really hope this will be re-opened. A lot of people are reporting that this is a problem for them. EDIT: Can confirm that the workaround works for me. |
We are having the exact same problem on 2.3.3. For us it is with UPS shipments. An interesting detail - the first shipment on any order does not have this issue. It is only for orders with split shipments, this will happen on any subsequent shipment made on an order that already has one. Both the weird screen popup, and no email. @engcom-Charlie - Is it possible that nuance might mean something? |
Hello @jove4015 Testing scenario: Result: So no sense to re-open this issue. |
Can confirm I had the same issue after upgrading from 2.3.2 to 2.3.3 CE. Can confirm @AndyJAllen fix worked, but only after running bin/magento setup:static-content:deploy -f en_GB en_US i.e. Cache flush and restart Varnish was not enough. |
This is probably caused by customized e-mail templates based on previous versions. If you have customized e-mail templates inserting track.phtml this way: Try changing that to this so it uses the layout XML: Otherwise track.phtml doesn't receive the (new) argument containing the TrackingUrl object argument defined in the layout xml. These 2 commits together broke it: @engcom-Charlie What's the policy on cases like this? It seems like a backward incompatibility issue that's missing from the release notes. |
@arnoutvreugdenhil I saw that was the issue as well. Thanks for providing that layout XML. You saved me a lot of time. It was the solution to my issue, and you posted five hours right before! This was meant to be. Haha! |
Thanks for the correct point on resolving of the issue but looks like the some problems still there. |
Above fix by @arnoutvreugdenhil solved the problem for us as well. Worth noting though, this only happened for orders where there was a custom value for the carrier. (Mentioning this because the tests to confirm the issue above specifically reference using named carriers.) |
@aholovan wrote:
Andrii's exactly correct; on 2.3.3 (and security patch 2.3.3-p1), we noticed multi-shipment orders had every tracking number in consecutive shipment emails, EG: Shipment 1, shipped by UPS, Tracking No: 1111111111, email shows the following:
Shipment 2: FedEx, Tracking No: 2222222222, but email shows both shipments incorrectly:
It should only show FedEx for the 2nd shipment email. The reason is as Andrii pointed out, in in 2.3.3/2.3.3-p1, in:
This line of code should be:
The reason being seems to be that the getTracksCollection function, at least on 2.3.3/2.3.3-p1, seems to have lost a constructor where it can be passed a shipment's id to filter the shipment data returned from the order's getTracksCollection. Since it has no constructor that uses the shipment id, it returns all shipments for the order, as we're seeing on 2.3.3/2.3.3-p1. But, if you are on 2.3.3/2.3.3-p1 and are experiencing this issue, you can override track.phtml and make the change yourself to fix shipment emails until you can upgrade to a Magento verison where the track.phtml code is correct. Note: We've noticed other shipment email issues still though for 2.3.3/2.3.3-p1, for example- the "shipped by" section isn't showing the full carrier name for us, and the product name is now showing (despite the variables in the template looking correct/being hydrated)... no idea why. :( Gonna take a look at the changes to the track.phtml/items.phtml files in 2.3.4 / 2.4 pipelines, maybe I can figure it out. :/ |
facing same issue, trying to send USPS tracking information |
I am also getting the same error on Magnto 2.3.4 using Porto 3.2.3 and the solution of @arnoutvreugdenhil did not resolve it. After I was unsuccessful modifying the porto shipment templates, I fell back to the luma templates for new shipment and new shipment guest which both have the following line and the error did not change: In addition, I changed php max input variables to 10000 |
While working on another issue yesterday, I had to delete and re-deploy static content as well as clear all of my cache layers. My error has now resolved with the use of the Luma email templates instead of the Porto templates for New Shipment and New Shipment Guest. (Not sure if changing php max input variables had anything to do with it or not.) |
I also faced the same issue for shipping email tracking number for Mangento 2.3.4 update. Unfortunatly AndyJAllen fix to the track.phtml didn't work for me . I think this because of my version is 2.3.4. But when i change the "is_legacy = 1" for the specific template in the databse in the table "email_template" it worked. |
There's an easy fix. The problem is caused by your previous modified email
template. You can change back to the default template on the
store->configuration->sales->sales emails page. Maybe you can delete the
modified email template on Marketing->Email Templates page first, and
modify the template again using the current default template. But right now
I am just using the default one. Problem solved.
…On Thu, Jul 2, 2020 at 9:45 PM viduranishantha ***@***.***> wrote:
I also faced the same issue for shipping email tracking number for
Mangento 2.3.4 update. Unfortunatly AndyJAllen fix to the track.phtml
didn't work for me . I thinks this because my version is 2.3.4.
But when i change the "is_legacy = 1" for the specific template in the
databse in the table "email_template" it worked.
*Table* : email_template
*Sql* : update email_template set is_legacy = 1;
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#25221 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AELBPKFAJVB4OQIPWZZHBGLRZUZ5JANCNFSM4JDRDNJA>
.
|
Hi Thanks |
The problem returned after upgrading to 2.3.5-p2. Now we're getting logged out after adding the tracking number, but it is saved to the order. I checked the file and this fix is already present. Now I'm looking for a new solution. |
Some error present after upgrade to 2.3.5-p2, resolved with AndyJAllen solution and make a static-rebuild Thanks a lot to AndyJAllen ! |
same problem with 2.3.5-p2, resolved with AndyJAllen solution and making clear cache and static deploy Thanks a lot to AndyJAllen ! |
Hi This issue has been fixed in 2.4.1 . They have modified
AND vendor/magento/module-sales/Block/Order/Email/Shipment/Items.php as
Below is the layout handle from shipping template NOTE: Just sharing fix from 2.4.1 version . Anyone working on old version can try with it. |
I am using Magento 2.4.2. My store was a fresh install of 2.4.1 and was upgraded to 2.4.2. I am using the Codazon Fastest theme and I am having the same problem, even with orders with a single shipment. I am having the problem with UPS specifically. It doesn't appear this has been fixed in 2.4.1 unless my theme is somehow causing the issue. Any help would be appreciated. |
I'm having the same issue on 2.4.2 as well. |
Wow I've been going nuts for 2 days trying to figure this out. Your solution is what fixed it. Thank you! |
Do check the email template basically below part {{layout handle="sales_email_order_shipment_track" shipment=$shipment order=$order}} Should be {{layout handle="sales_email_order_shipment_track" shipment_id=$shipment.entity_id order_id=$order.entity_id}} |
Do check email template basically below part {{layout handle="sales_email_order_shipment_track" shipment=$shipment order=$order}} Should be {{layout handle="sales_email_order_shipment_track" shipment_id=$shipment.entity_id order_id=$order.entity_id}} |
That works for the emails. But I noticed that those emails that fail, when clicking on the tracking link on either admin or as logged in customer, it throws an exception as well.
|
The solution provided by enyceedanny worked for me. If you have customized e-mail templates inserting track.phtml this way: Try changing that to this so it uses the layout XML: I am also using the codazon fastest theme with 2.4.2. I am going to report this to them so hopefully they update their code and I don't have to make this correction every time there's an update to the theme. |
This issue is exactly the same for the Porto 3.2.6 theme - I will report this to the developers. |
I just finished upgrading to 2.4.3. Guess what, issue still persists. Kind of an important functionality no? Anyway, usual workaround applied, replaced track.phtml with old one, did the trick. Please note, my track.phtml is timestamped 3rd Feb 2020 LMFAO. Hola Magento! Wakey wakey |
@stefanskotte I'm also using Porto. Seeing the file we have to replace here is in vendor/magento, this implies that the problem comes from Magento core, as the template is not being overwritten by Porto. Hope that helps. |
In 2.4.3 the issue is still there. |
Looks like a possible fix MC-42758 was merged on August 10, the same date 2.4.3 was released. The branch 2.4-develop is up-to-date with the fix, but not the 2.4.3 release branch. I don't know much about Magento releases. Should we expect this fix to be released in a patch or in the next feature update? |
Actually this issue was caused by your theme sales email htmls was located in
|
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
The text was updated successfully, but these errors were encountered: