Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 ...
Comment | File | Size | Author |
---|---|---|---|
#7 | invoice-image-test.patch | 2.95 KB | TR |
| |||
#3 | 2666752-3.patch | 853 bytes | TR |
|
Comments
Comment #2
TR CreditAttribution: TR commentedComment #3
TR CreditAttribution: TR commentedI'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.
Comment #4
TR CreditAttribution: TR commentedLet me also add an assert to the new OrderInvoiceTest to make sure we have an absolute e-mail in the invoice...
Comment #6
TR CreditAttribution: TR commentedThe 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.
Comment #7
TR CreditAttribution: TR commentedTurns 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.