-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Always use the site_url for generating urls in emails #6206
Conversation
3f92602
to
a00a291
Compare
Sorry, after submitting the pull request I found that I forgot some cases. Will try to make a clean merge request later this week. |
60b625d
to
f75a87a
Compare
This is now ready for review, test and merge |
@jbransen this is great ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried on Mautibox https://mautibox.com/6206/email/preview/2 and urls in emails are wrong:
That does not resolve my issue as the use case is different. It will replace all fully qualified url's by the one with the other hostname, so also links in the private admin interface. My use case is that I have a private (VPN access only) hostname for doing the admin, and a public one for hosting images/unsubscribe pages/etc. So I would like only url's that are send to users to contain the 'public' one, not all of them. Unfortunately it took so long to reply to the request that it now conflicts, and indeed I did not include all parts of the code. I may fix this when I have some time, but this will most likely not happen soon. Also, my PR has the same problem as #6752 which I just reviewed. |
Close in favor #6752 |
Description:
This change makes sure that all absolute url's put in emails (unsubscribe/webview links, themes, etc.) are based in the site_url. With the old version of the code this is based on the hostname of the user visiting the Mautic interface, but that breaks when there are different hostnames pointing to the same instance (for example one on a local network)..
Steps to reproduce the bug:
Steps to test this PR:
see above, the url's are then fine
List deprecations along with the new alternative:
List backwards compatibility breaks: