Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: notes re: masquerade

...

Change the bottom of the civicrm_initialize() function to the following:

Code Block

        // fix needed for Pressflow lazy session initialization -
        // if $_SESSION['CiviCRM'] is empty, unset it
        if(empty($_SESSION['CiviCRM'])) {
           unset($_SESSION['CiviCRM']); }
        return true;

...

Remove the $this->create(); line from the session's constructor function. Following patch is pasted from IRC and may need modification to apply. If so, please update this listing. Also, update if this works, so it can become the recommended solution.

No Format

svn diff CRM/Core/Session.php
Index: CRM/Core/Session.php
===================================================================
--- CRM/Core/Session.php (revision 26441)
+++ CRM/Core/Session.php (working copy)
@@ -84,8 +84,6 @@
function __construct()
{
$this->_session =& $_SESSION;
- $this->create();
}

...

Modify the line that strips out cookies in vcl_recv:

Code Block

 // Remove has_js and Google Analytics __* cookies. Also remove collapsiblock cookies.
  set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|__utma_a2a|has_js|collapsiblock)=[^;]*", "");

...

http://drupal.org/node/908194

This is a really common-sense change to the code, so hopefully it will be accepted. It looks like the Drupal 7 version is re-written so it's only patch was applied to version 6.x-1.x we need to worry about7.

mobile_tools

Problem

Mobile_tools will add to the = $_SESSION value on every pageload, thus creating a session cookie and breaking caching.

...