When composing CiviMail messages and enabling click tracking, CiviCRM is building URLs like http://example.org/public_html/wp-content/plugins/civicrm/civicrm/extern/url.php?u=106&qid=6870. public_html is the name of the web root and should not be part of the URL. Worth noting is that other CiviCRM-generated links (i.e., unsubscribe and opt-out tokens) are built correctly.

I have checked and rechecked my directory and path settings, and they appear to be correct. I have "fixed" the issue with an Apache rewrite rule, but I can't help feeling like:

  1. I'm missing something obvious
  2. I've found a bug

Any thoughts?

  • curious if you ended up resolving this issue? I am investigating what looks to be the same issue in a Drupal installation. Tracking links are being generated of the form example.org//var/www/html/sites/all/modules/civicrm/extern/…. Interesting to note that the HTML preview, 'send a test', and the HTML saved in the mailing report all have the links generated correctly.. it's just the actual sent mails that are getting butchered. Jun 27, 2017 at 13:24
  • I didn't end up with anything better than my rewrite bandaid. I have a feeling there's a bug in core. Those {civicrm.files} placeholders don't work in all circumstances. Have you tried replacing those with the actual paths? Jun 27, 2017 at 18:02
  • 1
    Thanks for your reply! Yes changing the resource value URL from [civicrm.root]/ to sites/all/modules/civicrm/ does seem to work. Would be nice to not have to check that... One more note is on another site with the exact same environment but a clean 4.7.x install [civicrm.root]/ is okay, but a site that looks like it has been upgraded to 4.7.14 from an original install of 4.4.x (from the file comments) was broken. I'll try to dig into it some more if I can make the time. Jun 27, 2017 at 18:59


Browse other questions tagged or ask your own question.