magento2
magento2 copied to clipboard
Email templates 2.4.3-p2 wrong var
Preconditions (*)
- Magento 2.4.3-p2 open source / enterprise.
- Php 7.4
Steps to reproduce (*)
- Load a creditmemo_new email from the backend.
- See for example: https://github.com/magento/magento2/blob/610f7f51faa94639da29f8001aded7559f114c54/app/code/Magento/Sales/view/frontend/email/creditmemo_new.html#L12
- Check the vars: <!--@vars {
- This applies for all email templates in Magento_Sales module.
Expected result (*)
- layout handle is correct. like:
layout handle="sales_email_order_creditmemo_items" creditmemo_id=$creditmemo_id order_id=$order_id:"Credit Memo Items Grid"
Actual result (*)
- Layout handle is still wrong. like
"layout handle=\"sales_email_order_creditmemo_items\" creditmemo=$creditmemo order=$order":"Credit Memo Items Grid",
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [ ] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- [x] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- [ ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @leonhelmus. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
- Summary of the issue
- Information on your environment
- Steps to reproduce
- Expected and actual results
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
- Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
-
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is valid
appears. -
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Description
label to the issue by yourself. -
[ ] 3. Add
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to. -
[ ] 4. Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! -
[ ] 5. Add label
Issue: Confirmed
once verification is complete. -
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Verified the issue on Magento 2.4-develop branch and the issue is reproducible. As per Magento devdocs, layout handle should be: layout handle="sales_email_order_creditmemo_items" creditmemo_id=$creditmemo_id order_id=$order_id:"Credit Memo Items Grid"
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-4403 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@magento I am working on this
Seems like the following example: https://github.com/magento/magento2/blob/610f7f51faa94639da29f8001aded7559f114c54/app/code/Magento/Sales/view/frontend/email/creditmemo_new.html#L12 is correct and used together with escape quotes. The layout handle statement is already implemented on line 87: https://github.com/magento/magento2/blob/610f7f51faa94639da29f8001aded7559f114c54/app/code/Magento/Sales/view/frontend/email/creditmemo_new.html#L87
Please, provide the steps where this statement causes the Magento issue.
Hi @leonhelmus , "layout handle" is correctly mentioned on line 87: magento2/app/code/Magento/Sales/view/frontend/email/creditmemo_new.html and escape quotes are added in commented section: <!--@vars { for formatting purpose which cannot be removed. We are closing this issue as this statement does not effect Magento behavior. Kindly reopen / create new issue if you are still facing any issues. Thank you.
@leonhelmus How did you end up fixing this? Looks like it's still an issue even on Vanilla 2.4.5-p1
@pmonosolo just use the var in the actual result of my description of this issue.at the moment they send a scalar object which isn't possible anymore from version >2.4.3-p3.
@pmonosolo just use the var in the actual result of my description of this issue. @engcom-November I wasn't talking about the handle, but about the arguments that it added are scalar.
- layout handle="sales_email_order_creditmemo_items" creditmemo_id=$creditmemo_id order_id=$order_id:"Credit Memo Items Grid"
@leonhelmus So this would be the correct output?
@pmonosolo should be yes.
@pmonosolo should be yes. Its the same as this: {{layout handle="sales_email_order_creditmemo_items" creditmemo_id=$creditmemo_id order_id=$order_id}}
@pmonosolo should be yes.
Hmmm, not working for me :(
When sending an email the items are just empty. The credit memo object just outputting NULL
Here is my full VARS section:
@pmonosolo maybe a third party module which screws it up. Or did you already check if the client overwritten the email templates from the backend. Or app/design. In default Magento this does work. So probably project specific i would say.
Y
@pmonosolo maybe a third party module which screws it up. Or did you already check if the client overwritten the email templates from the backend
Yes, I'm using both Yireo email tester and the SEND button - both output no items.
Using Both New Credit Memo and New Credit Memo (Magento / Luma).
@engcom-November Can you please try just sending the Credit Memo email using the default template?
Does the email arrive with items + taxes?