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 34
    • Issues 34
    • 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
  • #17

Closed
Open
Opened Jun 22, 2018 by jensschuppe@jensschuppe

"Tracking Click-Throughs" option in mailings generates 404 links when using multi-language with path prefix

This occurred in a Drupal environment with multiple languages and the following configuration:

  • Languages in Drupal:
    • English (activated)
    • German (activated, default)
  • Languages in CiviCRM:
    • Default language: English
    • available: German, English
    • Inherit CMS language: yes

Conditions under which the erroneous behavior can be reproduced:

  • Mailing language: English
  • UI language: German
  • language prefix in the URL: none or "de"

or:

  • Mailing language: German
  • UI language: English
  • language prefix in the URL: none or "en"

ergo: Using a UI language different from the mailing language and having path prefixes for language detection.

The result is links to the tracking script being prefixed with the language code of the UI language, like so: https://example.org/de/sites/all/modules/civicrm/extern/url.php?u=123&qid=12345

which is producing a 404 as obviously the path to the script file is not valid due to the language prefix.

Apparently, this code in CRM/Mailing/BAO/TrackableURL.php:93 is where the URL is constructed, but with userFrameworkResourceURL being prefixed with the language code:

$redirect = $config->userFrameworkResourceURL . "extern/url.php?u=$id";
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/mail#17