Problem/Motivation

There are warnings in the log when a mail is sent with internal links.

Warning: Invalid argument supplied for foreach() in Drupal\mimemail\Utility\MimeMailFormatHelper::mimeMailUrl() 

It seems that the code to check for languages might be outdated.

Comments

hussainweb created an issue. See original summary.

hussainweb’s picture

Status: Active » Needs review
StatusFileSize
new0 bytes

Here is a fix.

hussainweb’s picture

StatusFileSize
new1.17 KB

I don't know how that happened. Here's the correct patch.

hansfn’s picture

I have one question about your patch. Why the change from $args[0] to $args[1]. I created a similar patch for my site, but didn't include that change.

hussainweb’s picture

Its quite some time now, so I don't remember the details. The best I can remember is that in my testing, the $path started with a '/' (another change) which makes $args[0] useless. The actual language code we want to check would be in $args[1]. I have been using this patch since then and it is working fine on my site. Please let me know if you find something wrong in your testing.

damienmckenna’s picture

damienmckenna’s picture

hussainweb’s picture

StatusFileSize
new1.1 KB

Rerolling since the patch doesn't apply anymore

  • sgabe committed 472c458 on 8.x-1.x authored by hussainweb
    Issue #2807645 by hussainweb: Handle languages correctly when generating...
sgabe’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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