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 CiviContribute (Moderator: Donald Lobo) »
  • Error: Could not find valid key when using CiviContribute
Pages: [1]

Author Topic: Error: Could not find valid key when using CiviContribute  (Read 2077 times)

kmitz

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 2
Error: Could not find valid key when using CiviContribute
November 07, 2008, 04:36:55 am
Hi,

Platform: Drupal 5.10 Civi 2.0.4 (planning upgrade)

We're having an issue with CiviContribute when we submit the first form page of a contribution.  Instead of the expected confirmation page (and prior to being sent to PayPal), we get a non-recoverable error complaining about a non-valid key (qfKey, I'm assuming).  This page had been working fine at least up until I upgraded Drupal to 5.10 a few weeks ago (we just now noticed the problem).

It seems to be related somehow to Internet Explorer (I haven't yet seen the problem on Firefox or on any Mac browser).  I originally thought it might be a caching problem, but I had someone try the page from several computers within a different organization that have nothing to do with us and he was able to duplicate the problem.

The problem occurs when a Drupal Anonymous user tries to submit the CiviContribute form.

I've read some of the other posts on this subject, and I've made sure that my BASEURL constant is set properly in civicrm.settings.php and I do have a Drupal user 0 (zero).  Caching is off.

I looked up the log file and there were quite a few entries just like this:

Code: [Select]
Nov 06 21:58:37  [info] $backTrace = /chroot/home/example/example.com/html/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 265
/chroot/home/example/example.com/html/sites/all/modules/civicrm/CRM/Core/Controller.php, fatal, 185
/chroot/home/example/example.com/html/sites/all/modules/civicrm/CRM/Core/Controller.php, key, 136
/chroot/home/example/example.com/html/sites/all/modules/civicrm/CRM/Contribute/Controller/Contribution.php, __construct, 57
/chroot/home/example/example.com/html/sites/all/modules/civicrm/CRM/Contribute/Invoke.php, __construct, 105
/chroot/home/example/example.com/html/sites/all/modules/civicrm/CRM/Core/Component.php, main, 130
/chroot/home/example/example.com/html/sites/all/modules/civicrm/CRM/Core/Invoke.php, invoke, 158
/chroot/home/example/example.com/html/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 329
, civicrm_invoke,
/chroot/home/example/example.com/html/includes/menu.inc, call_user_func_array, 418
/chroot/home/example/example.com/html/index.php, menu_execute_active_handler, 15

Nov 06 22:54:21  [info] $Fatal Error Details = Array
(
    [message] => Could not find valid Key
    [code] =>
)

Any ideas?[/code]
« Last Edit: November 07, 2008, 05:50:07 am by kmitz »

kmitz

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 2
Re: Error: Could not find valid key when using CiviContribute
November 07, 2008, 07:04:28 am
When looking at the session table in phpMyAdmin, I can see that there were 11 sessions created for a particular IP address in 50 minutes (just one example; there are at least 3 IP addresses like this).

I'm wondering if something within IE (cookie blocker or firewall/internet protection) is preventing a PHPSESSID variable from being set in the browser.  To Civi, every page would then look like a new session to CiviCRM (no qfKey could ever be set).

Does this make sense?

kmitz

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error: Could not find valid key when using CiviContribute
November 07, 2008, 07:46:40 am

have cookies been disabled for those IE browser(s)? assuming 1 person / ip address, you should not see 11 session ids

seems like that is the cause for the qfKey issue

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

kmitz

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 2
Re: Error: Could not find valid key when using CiviContribute
November 07, 2008, 08:01:55 am
I agree, at least at this point.  When I delete all cookies, temp files and history, I can't get the problem to happen again.  If I crank up the privacy to disallow cookies, I get the error message.

Thanks for the confirmation on that point.

kmitz

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 2
Re: Error: Could not find valid key when using CiviContribute
November 12, 2008, 07:47:16 pm
Hey lobo,

Just a follow up...I met with seven other members (all on XP or Vista and either IE or Firefox) and two of them (both IE) had the same issue.  One guy who was having the most problems finally downloaded and installed the Google browser "Chrome" (sp?), and immediately logged in and got to work.  I wasn't able to spend enough time to compare settings or installed internet security packages, unfortunately.

I think it's safe to chalk this one up to Senor Gates or cookies or both.

Thanks for the help.

kmitz

Sunil

  • I post frequently
  • ***
  • Posts: 131
  • Karma: 23
  • The community around a product more important than the product itself?
    • CiviCRM
Re: Error: Could not find valid key when using CiviContribute
November 13, 2008, 07:18:40 am

Could not find valid Key

This error may occur when doing the contribution as an anonymous user and in Drupal database user table uid = 0 record not present

Plz check it
The community around a product more important than the product itself?

kmitz

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 2
Re: Error: Could not find valid key when using CiviContribute
November 14, 2008, 06:45:10 am
As I said in my first post, it's there.  :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Error: Could not find valid key when using CiviContribute

This forum was archived on 2017-11-26.