Because of the core "fix" in #1494670: References to CSS, JS, and similar files should be root-relative URLs: avoids mixed content warnings & fewer bytes to send, '#theme' => 'image' will no longer return absolute URLs for local images, so the site logo in our e-mailed invoice contains a broken link.

Not much we can do about this until core restores this functionality. I guess we could just hard-code the image tag ...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR created an issue. See original summary.

TR’s picture

Issue tags: +beta blocker
TR’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
853 bytes

I've given up trying to get this fixed in core. This is not the preferred way to do things, but at least we will once again have a logo image in the invoice e-mails.

TR’s picture

Let me also add an assert to the new OrderInvoiceTest to make sure we have an absolute e-mail in the invoice...

  • TR committed 1441c4d on 8.x-4.x
    Issue #2666752 by TR: E-mailed invoice contains broken image link
    
TR’s picture

Status: Needs review » Fixed

The test system mail handler doesn't support HTML email, so writing a test to check for an absolute link in an img tag requires a lot of extra work. While I'd like to have this test, it's really not worth the effort considering all the other things that need work before a beta release. So I'm just committing this and closing the issue. There's a @todo in the code, and hopefully eventually the core issue gets fixed and we can remove this patch and do things the right way again.

TR’s picture

Turns out I had to do this for a core issue anyway, and it was a lot easier than I thought it was going to be.

So here's a test to ensure images in our e-mailed invoices have absolute URLs.

  • TR committed fcda714 on 8.x-4.x
    Issue #2666752 by TR: E-mailed invoice contains broken image link - add...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.