Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
M
Mailing
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards
  • Development
  • Mailing
  • Issues
  • #52

Closed
Open
Opened Sep 05, 2019 by Monish Deb@monish.debDeveloper

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;
Edited Sep 05, 2019 by Monish Deb
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/mail#52