Answers.Body: <p>Update - this was actually unrelated to CiviCRM.  I had not updated the htaccess file correctly after a core upgrade.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-05T06:32:25.443Z
Answers.LastActivityDate: 2018-04-05T06:32:25.443Z
Answers.UserDisplayName: Alg
Body: <p>I've just upgraded to CiviCRM 4.7.31 from 4.7.30 on Drupal 7 and we've identified an issue which wasn't there previously.  After being redirected to PayPal from a contribution form, the session is invalidated once you return to the site.  I've checked the qvKey from the form to the "return page" (which throws an error) and it is correct. Payments are lodged correctly. Any ideas? </p>
  
  <p><strong>Error log is</strong> </p>
  
  <pre><code>$backTrace = 
  #0 /www/sites/all/modules/civicrm/CRM/Core/Error.php(381): CRM_Core_Error::backtrace("backTrace", TRUE) 
  #1 /www/sites/all/modules/civicrm/CRM/Core/Controller.php(833): CRM_Core_Error::fatal("We can't load the requested web page. This page requires cookies to be enable...") 
  #2 /www/sites/all/modules/civicrm/CRM/Core/Controller.php(853): CRM_Core_Controller-&gt;invalidKeyCommon() 
  #3 /www/sites/all/modules/civicrm/CRM/Contribute/Controller/Contribution.php(74): CRM_Core_Controller-&gt;invalidKeyRedirect() 
  #4 /www/sites/all/modules/civicrm/CRM/Core/Controller.php(312): CRM_Contribute_Controller_Contribution-&gt;invalidKey() 
  #5 /www/sites/all/modules/civicrm/CRM/Core/Controller.php(204): CRM_Core_Controller-&gt;key("CRM_Contribute_Controller_Contribution", TRUE, FALSE) 
  #6 /www/sites/all/modules/civicrm/CRM/Contribute/Controller/Contribution.php(55): CRM_Core_Controller-&gt;__construct("CiviContribute", "null") 
  #7 /www/sites/all/modules/civicrm/CRM/Core/Invoke.php(304): CRM_Contribute_Controller_Contribution-&gt;__construct("CiviContribute", TRUE, "null", NULL, "false") 
  #8 /www/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15)) 
  #9 /www/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3)) 
  #10 /www/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:3)) 
  #11 [internal function](): civicrm_invoke("contribute", "transact") 
  #12 /www/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2)) 
  #13 /www/index.php(21): menu_execute_active_handler() 
  #14 {main} 
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-19T11:24:11.603Z
Comments.Text: I found that the following commit fixes some redirect problems which occur when URLs are constructed incorrectly by the `perform` method: https://github.com/civicrm/civicrm-core/pull/11708/commits/cea37e01340bebebe3aca730d93bfd83668f7b2c
Comments.UserDisplayName: Christian Wach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-20T07:43:27.717Z
Comments.Text: Thanks Christian I applied the commit however it did not resolve the issue.
Comments.UserDisplayName: Alg
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-20T13:13:12.693Z
Comments.Text: Ah well, worth a try. I'd still look at whether there is a redirect happening prior to the request which triggers the error.
Comments.UserDisplayName: Christian Wach
Tags: <drupal><civicontribute><paypal>
Title: Session invalidated after returning from PayPal CiviCRM v 4.7.31
ThreadText: # Session invalidated after returning from PayPal CiviCRM v 4.7.31
  
  (Asked by: username_0 on 2018-03-18)
  
  I've just upgraded to CiviCRM 4.7.31 from 4.7.30 on Drupal 7 and we've identified an issue which wasn't there previously. After being redirected to PayPal from a contribution form, the session is invalidated once you return to the site. I've checked the qvKey from the form to the "return page" (which throws an error) and it is correct. Payments are lodged correctly. Any ideas?
  
  **Error log is**
  
  ```
  $backTrace = 
  #0 /www/sites/all/modules/civicrm/CRM/Core/Error.php(381): CRM_Core_Error::backtrace("backTrace", TRUE) 
  #1 /www/sites/all/modules/civicrm/CRM/Core/Controller.php(833): CRM_Core_Error::fatal("We can't load the requested web page. This page requires cookies to be enable...") 
  #2 /www/sites/all/modules/civicrm/CRM/Core/Controller.php(853): CRM_Core_Controller->invalidKeyCommon() 
  #3 /www/sites/all/modules/civicrm/CRM/Contribute/Controller/Contribution.php(74): CRM_Core_Controller->invalidKeyRedirect() 
  #4 /www/sites/all/modules/civicrm/CRM/Core/Controller.php(312): CRM_Contribute_Controller_Contribution->invalidKey() 
  #5 /www/sites/all/modules/civicrm/CRM/Core/Controller.php(204): CRM_Core_Controller->key("CRM_Contribute_Controller_Contribution", TRUE, FALSE) 
  #6 /www/sites/all/modules/civicrm/CRM/Contribute/Controller/Contribution.php(55): CRM_Core_Controller->__construct("CiviContribute", "null") 
  #7 /www/sites/all/modules/civicrm/CRM/Core/Invoke.php(304): CRM_Contribute_Controller_Contribution->__construct("CiviContribute", TRUE, "null", NULL, "false") 
  #8 /www/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15)) 
  #9 /www/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3)) 
  #10 /www/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:3)) 
  #11 [internal function](): civicrm_invoke("contribute", "transact") 
  #12 /www/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2)) 
  #13 /www/index.php(21): menu_execute_active_handler() 
  #14 {main} 
  
  ```
  
  **Tags:** drupal, civicontribute, paypal
  
  > **Comments:**
  > **username_1**: I found that the following commit fixes some redirect problems which occur when URLs are constructed incorrectly by the `perform` method: https://github.com/civicrm/civicrm-core/pull/11708/commits/cea37e01340bebebe3aca730d93bfd83668f7b2c  
  > **username_0**: Thanks username_1 I applied the commit however it did not resolve the issue.  
  > **username_1**: Ah well, worth a try. I'd still look at whether there is a redirect happening prior to the request which triggers the error.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-04-05. Score: 1
  
  Update - this was actually unrelated to CiviCRM. I had not updated the htaccess file correctly after a core upgrade.
  
  
  ---
  
  