Closed
Description
This issue is automatically created based on existing pull request: #32298: Ensure string is returned when applying filter to email template
Description (*)
Added string casting within the email template filter method to ensure the return value is a string.
Currently if an exception is caught while not in developer mode a Phrase object is returned. This in turn triggers a fatal Uncaught TypeError in magento/framework/Filter/DirectiveProcessor/TemplateDirective.php:68.
Related Pull Requests
N/A
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
- Install module
template_error.zip - Switch to Production mode.
- Go to Marketing -> Newsletter Templates and create a new one.
- Insert
{{template config_path="design/email/header_template"}}
into Template Content filed. - Preview Template.
We're sorry, an error has occurred while generating this content.
message displayed.
Questions or comments
N/A
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.4-develop branchAffects non-critical data or functionality and does not force users to employ a workaround.
Type
Projects
Status
Done