CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Tracked opens and click throughs not working after updating to 3.4.2
Pages: [1]

Author Topic: Tracked opens and click throughs not working after updating to 3.4.2  (Read 1510 times)

mirrorstage

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 1
  • CiviCRM version: 4.6.7
  • CMS version: Drupal 6.37
  • MySQL version: 5.6.23
  • PHP version: 5.4.42
Tracked opens and click throughs not working after updating to 3.4.2
June 04, 2011, 08:50:46 pm
I upgraded to 3.4.2 and now the civimail opens no longer track and the click through URLs go to:

Quote
Could not find valid configuration dir, best guess: /home/mysite/public_html/sites

I added a settings_location.php files to sites/default/modules/civicrm with
Code: [Select]
<?php
define
( 'CIVICRM_CONFDIR', '/home/mysite/public_html/sites' );
?>

since that is the drupal sites path.

I had this problem several months ago, and eventually got it working, but can't figure out what I'm doing wrong now, or if I'm forgetting something. Please help!!

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 04, 2011, 10:26:00 pm
@mirrorstage,

That message gets generated when searching for 'civicrm.settings.php' which (on my site) is located at 'sites/default' rather than 'sites'.

Also check the directories and files are accessible by the user that runs Apache ('www-data' in my case).

Ken

mirrorstage

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 1
  • CiviCRM version: 4.6.7
  • CMS version: Drupal 6.37
  • MySQL version: 5.6.23
  • PHP version: 5.4.42
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 05, 2011, 01:24:30 am
Thanks, Ken. That's what I thought; I've tried both and get the same error.

For the directories and files, do you mean the permissions settings? I made sure the public_html, sites and default folders are all set to 755 and the files (civicrm.settings.php and settings_location.php are set to 644, and still get
Quote
Could not find valid configuration dir, best guess: /home/mysite/public_html/sites/default
(or
Quote
Could not find valid configuration dir, best guess: /home/mysite/public_html/sites
)

Any other ideas?

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 05, 2011, 06:35:30 pm
@mirrorstage,

I don't understand why you're having this problem, but I have a few questions ...

Are you only getting the error in the cases you mentioned? do you get it on 'normal' pages?
What is the URL that generates this error? Does it differ in form to 'normal' pages?
What version did you upgrade from?

Ken

mirrorstage

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 1
  • CiviCRM version: 4.6.7
  • CMS version: Drupal 6.37
  • MySQL version: 5.6.23
  • PHP version: 5.4.42
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 05, 2011, 06:43:18 pm
The error is when recipients click on a url link that is supposed to be trackable in civimail. I've been able to track opens and click-throughs for several months, and then I upgraded to 3.4.2.

I sent a bulk email through civimail with track opens and track click-throughs selected, as it hasn't been a problem for months. The opens aren't tracking; it shows as "0" even though I know the message has been opened by several people. And when recipients click on the links in the email, they get sent to a page with the message:
Quote
Could not find valid configuration dir, best guess: /home/mysite/public_html/sites/default

The click through url seems to be formatted correctly, but something along the line is no longer configured correctly, and I can't figure out what it is.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 05, 2011, 06:51:34 pm
@mirrorstage,

I'm clutching at straws here, but the 'Update CiviCRM to 3.4' documentation page says ...
Quote
If your CiviCRM codebase is NOT located in either <drupal root>/modules/civicrm or <drupal root>/sites/all/modules (i.e. you are using a symlink from there to your codebase) - you will need to create a local file in the top-level directory of your codebase which points to the location of your drupal sites directory.

Do you have that symlink?

Ken

mirrorstage

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 1
  • CiviCRM version: 4.6.7
  • CMS version: Drupal 6.37
  • MySQL version: 5.6.23
  • PHP version: 5.4.42
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 05, 2011, 06:56:43 pm
I'm not sure what a symlink is. My civicrm (and other modules) are all in sites/default/modules.

That's why I added the settings_location.php file in the sites/default/modules/civicrm folder, configured as:
Code: [Select]
<?php
define
( 'CIVICRM_CONFDIR', '/home/mysite/public_html/sites/default' );
?>

And that's why I am puzzled as to why it's not working.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 05, 2011, 08:07:23 pm
@mirrorstage,

Try removing the closing PHP tag "?>". (I'm beginning to sound like a PHP developer.)

Ken

mirrorstage

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 1
  • CiviCRM version: 4.6.7
  • CMS version: Drupal 6.37
  • MySQL version: 5.6.23
  • PHP version: 5.4.42
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 05, 2011, 08:21:14 pm
Ken, I tried your suggestion, and it didn't seem to make a difference, unfortunately.

I think I need to adjust something in either the php.ini or .htaccess file. I have a dim memory of doing *something* but sadly I neglected to document exactly how I solved this back in March. Drat! I will not make that mistake twice...if I can only figure out what it is I'm supposed to adjust.

I'm also trying to figure out if I need to configure a symlink to reside in sites/all that points to sites/default.

I appreciate your assistance, though. Hopefully between the two of us, we'll get it figured out.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 05, 2011, 08:52:03 pm
@mirrorstage,

Not sure if I can be much help, unfortunately, as I had a quick look at the code generating your message, and at the documentation, and I've passed over the edge of my experience. Can I suggest hopping on IRC and talking to the developers?

Ken

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 05, 2011, 11:32:11 pm
Quote from: mirrorstage on June 05, 2011, 06:56:43 pm
Code: [Select]
<?php
define
( 'CIVICRM_CONFDIR', '/home/mysite/public_html/sites/default' );
?>

It should be

define( 'CIVICRM_CONFDIR', '/home/mysite/public_html/sites' );
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

mirrorstage

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 1
  • CiviCRM version: 4.6.7
  • CMS version: Drupal 6.37
  • MySQL version: 5.6.23
  • PHP version: 5.4.42
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 06, 2011, 07:25:11 pm
xavier, I've tried both. Since the civicrm.settings.php file is in public_html/sites/default I tried that after first trying public_html/sites. Neither solved the problem.

I just changed the settings_location.php file back to public_html/sites and again got sent ot a page:

Quote
Could not find valid configuration dir, best guess: /home/mysite/public_html/sites

Any other suggestions?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 06, 2011, 10:00:52 pm
Hi,

Try this patch:

Code: [Select]
Index: CRM/Utils/System/Drupal.php
===================================================================
--- CRM/Utils/System/Drupal.php (revision 34642)
+++ CRM/Utils/System/Drupal.php (working copy)
@ -354,7 +354,13 @@
     static function cmsRootPath( )
     {
         $cmsRoot = $valid = null;
-       
+        global $civicrm_root;
+
+        if (file_exists ($civicrm_root. '/settings_location.php')) {
+            require_once ($civicrm_root. '/settings_location.php');
+            return CIVICRM_CONFDIR . "/..";
+        }
+

Otherwise, you'll have to go debugging the code and track what's going on in that file (the BootStrap method) by adding print_r and die statements.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

mirrorstage

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 1
  • CiviCRM version: 4.6.7
  • CMS version: Drupal 6.37
  • MySQL version: 5.6.23
  • PHP version: 5.4.42
Re: Tracked opens and click throughs not working after updating to 3.4.2
June 08, 2011, 11:47:36 am
xavier, I tried adding the patch and it didn't seem to do anything.

So, I restored the database to 3.4.0 and re-installed 3.4.2, added the settings_location.php file in sites/default/modules/civicrm, made sure my php version was switched back to 5.3.4, flushed the caches and sent a test mailing, which still resulted in
Quote
Could not find valid configuration dir, best guess: /home/mirrost/public_html/sites

I re-installed your patch in CRM/Utils/System/Drupal.php and got the same result. Any other ideas?

Thanks for your help!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Tracked opens and click throughs not working after updating to 3.4.2

This forum was archived on 2017-11-26.