Skip to content
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

Handle order results in broken tracking mail #199

Closed
evs-xsarus opened this issue Aug 18, 2020 · 4 comments
Closed

Handle order results in broken tracking mail #199

evs-xsarus opened this issue Aug 18, 2020 · 4 comments
Assignees

Comments

@evs-xsarus
Copy link

To Reproduce
Steps to reproduce the behavior:

  1. Place an order
  2. Open the admin
  3. Go to Sales > Order
  4. View the order
  5. Click on button 'Handle'

Expected result
A tracking URL added to the order and a packing slip downloaded.

Actual result
A broken page showing part of the track.phtml:

Verzonden door Tracking-nummer
PostNL:  

The tracking URL is added to the order though.

Workaround
Changing the templato to not load the tracking url

Debugging
Error:

Call to a member function getUrl() on null in vendor/magento/module-sales/view/frontend/templates/email/shipment/track.phtml:28

This template is defined in

vendor/magento/module-sales/view/frontend/layout/sales_email_order_shipment_track.xml

In this XML, argument 'tracking_url' is added, but this is a frontend XML. Thus, said argument isn't available in the admin.

Running

  • Magento version: 2.3.5-p2
  • PHP version: 7.3
  • TIG PostNL version: 1.9.4.1
@tig-jaspersmits
Copy link
Contributor

Hi @evs-xsarus ,

Thanks for informing us about this. I want to try and reproduce the problem so we can take the necesary steps to fix this.
You are talking about the button "Handle". What kind of button is this? I don't have that button when I view the order. Could you maybe share a screenshot?

Kind regards,
Jasper
TIG

@evs-xsarus
Copy link
Author

@tig-jaspersmits thank you for replying. Your comment made me think and look through the code. Turns out to be a custome piece of code in the admin in which we:

  • create shipments
    ** this will generate the tracking URL
  • notify customers by mail
    ** this breaks.

Seeing this, I must fix it myself :). Ticket closed.

@evs-xsarus
Copy link
Author

Turned out to be changed mail templates by Magento: magento/magento2#25221 (comment)

@tig-jaspersmits
Copy link
Contributor

Hi @evs-xsarus ,

Thanks for letting me know. Good to hear you found the solution!

Kind regards,
Jasper
TIG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants