-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Wrong asset urls in transactional email #15559
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
Comments
I'll detail here the fix i may use in my project (this is not necessarily the fix to be used by Magento) The safest choice i think is to use a dedicated Asset Repository instance (instead of a singleton) during one Email Template processing (there is also its "baseUrl" argument to instantiate and change its class to Magento\Framework\Url instead of the backend one). So my solution is to replace Asset Repository class by a custom () that detects when there is a app emulation and delegates public calls to either the default code or an Asset Repository that would have been instantiated when emulation started. |
@chipsmaster, thank you for your report. |
same problem on 2.3.1: sending password recovery emails from the backend results in wrong asset urls. @chipsmaster thanks for the workaround example code. unfortunately I found that it requires even more tweaking than this, as the |
Hi @chipsmaster, |
@ihor-sviziev this is still an issue in 2.4.2-p1 - static assets in order confirmation mails sent from the magento admin gui have admin static assets included. to reproduce it, ensure the magento backend uses a different domain, f.e. frontend: www.shop.com, backend: admin.shop.com |
Theme assets are managed by Magento\Framework\View\Asset\Repository and there are problems with it when using "app emulation" (used by email template processing) :
I put the two issues in same ticket to keep them in mind when reworking this asset management if any
I used the "Reset password" feature to demonstrate the issues but it's the same with order confirmation email.
Preconditions
Steps to reproduce
Expected result
Actual result
The text was updated successfully, but these errors were encountered: