Body: <p>When composing CiviMail messages and enabling click tracking, CiviCRM is building URLs like <a href="http://example.org/" rel="nofollow noreferrer">http://example.org/</a><strong>public_html</strong>/wp-content/plugins/civicrm/civicrm/extern/url.php?u=106&amp;qid=6870. <strong>public_html</strong> 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.</p>
  
  <p>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:</p>
  
  <ol>
  <li>I'm missing something obvious</li>
  <li>I've found a bug</li>
  </ol>
  
  <p>Any thoughts?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-27T13:24:15.037Z
Comments.Text: 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 http://example.org//var/www/html/sites/all/modules/civicrm/extern/url.php. 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.
Comments.UserDisplayName: Eli Lisseck
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-27T18:02:49.917Z
Comments.Text: 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?
Comments.UserDisplayName: universalhandle
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-27T18:59:59.033Z
Comments.Text: 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.
Comments.UserDisplayName: Eli Lisseck
Tags: <civimail><tracked-links>
Title: CiviMail click tracker URL includes web root
ThreadText: # CiviMail click tracker URL includes web root
  
  (Asked by: username_0 on 2017-03-22)
  
  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?
  
  **Tags:** civimail, tracked-links
  
  > **Comments:**
  > **username_1**: 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 http://example.org//var/www/html/sites/all/modules/civicrm/extern/url.php. 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.  
  > **username_0**: 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?  
  > **username_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.  
  
  ---
  
  ## 0 answers
  
  