mailing.viewUrl token doesn't work in Drupal8 instance
I wasn't able to replicate it in other CMSs but in Drupal8. When we sent a mail via cron, the 'View in your browser' link redirects to https://Array/ instead of https:://www.example.com/civicrm/mailing/view?reset=1&id=195. Strangely I was not able to replicate it on test mail.
This is the fix which resolved my issue
diff --git a/CRM/Utils/Token.php b/CRM/Utils/Token.php
index b001c84..d1ad601 100644
--- a/CRM/Utils/Token.php
+++ b/CRM/Utils/Token.php
@@ -485,7 +485,7 @@ class CRM_Utils_Token {
$mailingKey = $hash;
}
$value = CRM_Utils_System::url('civicrm/mailing/view',
"reset=11&id={$mailingKey}",
- TRUE, NULL, FALSE, TRUE
+ TRUE
);
break;