3

Civimail is inserting a path for the open tracking image that includes var/www/html

example where it does not work https://(domain.org)/var/www/html/sites/all/modules/civicrm/extern/open.php?q=nnnn

for some mailings the path is correct: https://(domain.org)/sites/all/modules/civicrm/extern/open.php?q=nnnn

The tracking works when I manually remove the var/www/html from the path for a given url and the open report shows the open

There have been no changes to the default directory or resource paths.

Anyone else see this behavior? It seems to have started in November (2016) but is inconsistent. Any suggestions on where to look?

  • Hi, Dave, what is the version of CiviCRM you are using and did you do an upgrade in November? – Kainuk - CiviCooP Dec 11 '16 at 18:52
  • This issue might be of interest - issues.civicrm.org/jira/browse/CRM-19303 - might be a change to how CiviCRM obtains that image path relative to the site root / civicrm root. – Chris Burgess Dec 11 '16 at 22:55
  • It showed up first on 4.7.12 and continues (today) on 4.7.14 – Dave T Dec 12 '16 at 18:46
  • further testing seems to point to mailings that either start with a message template OR are re-uses of prior mailings. Perhaps the code that inserts the tracking image is broken or overriden by the use of prior content. I think the different path is interesting. Maybe the tokenization of paths has something to do with it - if the template or re-use code is not using the path tokens correctly? – Dave T Dec 12 '16 at 18:48
  • This problem continues. Recent investigation shows that the problem is related to the use of click through tracking. When click tracking is enabled, non custom url's (those without a cid, for example) are also incorrectly formed with the same addition of var/www/html path as the open tracking image. When the click through tracking option is turned off, open tracking does work as well as non-custom URLs. – Dave T Mar 11 '17 at 12:59
3

A workaround is to change the root civicrm token to an absolute path (Credit due to Eli Lisseck for research and workaround solution)

Under Resource URLs, change CiviCRM Resource URL from [civicrm.root]/ to sites/all/modules/civicrm/

(Note that civicrm.settings.php has the following setting for sites that work correctly and sites that do not work correctly. $civicrm_root = '/var/www/html/sites/all/modules/civicrm';)

So, while this appears to be a workaround, it is hiding the "root" problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.