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

[Newsletter] Resolved host url is not correct #4343

Open
aarongerig opened this issue May 9, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@aarongerig
Copy link
Contributor

commented May 9, 2019

Bug Report

When sending a newsletter, the host url gets resolved incorrectly. This is because [\Pimcore\Tool::getHostUrl()](https://github.com/pimcore/pimcore/blob/master/lib/Tool.php#L452) can't resolve the current request.

The host url is used to for example prefix image resources. Now, if you are sending the newsletter from a secure domain, the https protocol is ignored and http is used to process the newsletter template. This causes a lot of issues, some email clients don't even display "insecure" image resources.

Also if you're using the www prefix for your website's domain, that also gets ignored. That shouldn't be a big issue though.

Expected behavior

Images getting prefixed with the correct host url, e.g. https://www.domain.com

Actual behavior

Images getting prefixed with the wrong host url, e.g. http://domain.com

Steps to reproduce

  1. Go to https://demo-basic.pimcore.org/admin and sign in
  2. Open the newsletter template newsletters / example-mailing
  3. Send a newsletter to a random email address (doesn't matter which one)
  4. Preview the HTML email in the "Sent Emails" tab and inspect the large image with the palm trees in it
@solverat

This comment has been minimized.

Copy link
Contributor

commented May 9, 2019

maybe related: #3579

@aarongerig

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2019

@brusch WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.