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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • User Registration Profile "Could not find valid Key"
Pages: [1]

Author Topic: User Registration Profile "Could not find valid Key"  (Read 3920 times)

linkx

  • I post occasionally
  • **
  • Posts: 86
  • Karma: 7
User Registration Profile "Could not find valid Key"
July 02, 2007, 12:08:37 pm
When creating a new account on my Drupal site, the CiviCRM profile field returns an error:

Quote
Sorry. A non-recoverable error has occurred.

Could not find valid Key

Return to CiviCRM menu.

This began only after I added address fields to the profile.

Thks!

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: User Registration Profile "Could not find valid Key"
July 02, 2007, 12:20:43 pm

In general please do a forum search before posting an issue. This is a frequently discussed topic, here are some solutions:

a. there is no entry for uid = 0 in your drupal users table (people delete it by mistake and/or user import module might be deleting it according to one IRC user)

OR

b. the host names dont match. so ensure that the CIVICRM_UF_BASEURL and $base_url (in drupal settings.php) have the same domain name. If base_url is not set, try setting it (not sure why it being unset causes it to fail, but it does Sad

OR

c. you have drupal cache enable. Either disable drupal cache or apply the patch described here:

http://forum.civicrm.org/index.php/topic,402.0.html

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

kimdang1

  • Guest
Re: User Registration Profile "Could not find valid Key"
September 19, 2007, 09:36:52 pm
a. there is no entry for uid = 0 in your drupal users table (people delete it by mistake and/or user import module might be deleting it according to one IRC user)

What does this mean? i don't get it.  Do I need to INSERT "UID = 0" or something?  I'm confused.  Or should I put delete the first user? 

kimdang1

  • Guest
Re: User Registration Profile "Could not find valid Key"
September 19, 2007, 09:39:19 pm
Also, waht do you mean by

b. the host names dont match. so ensure that the CIVICRM_UF_BASEURL and $base_url (in drupal settings.php) have the same domain name. If base_url is not set, try setting it (not sure why it being unset causes it to fail, but it does Sad

in the settings, you just need to set the base_url to your home url.  what two host names do we match? 

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: User Registration Profile "Could not find valid Key"
September 19, 2007, 11:36:20 pm

In settings.php there is:

$base_url = 'http://example.com/lobo';  // NO trailing slash!

In civicrm.settings.php there is:

define( 'CIVICRM_UF_BASEURL'      , 'http://example.com/lobo/' );

You need to make sure that the above two variables have the same value (skip the trailing slash difference)

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

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: User Registration Profile "Could not find valid Key"
September 19, 2007, 11:39:35 pm
Quote from: kimdang1 on September 19, 2007, 09:36:52 pm
a. there is no entry for uid = 0 in your drupal users table (people delete it by mistake and/or user import module might be deleting it according to one IRC user)

Check the users table in your drupal database and ensure that there is an entry for uid = 0

If the above does not make a lot of sense, please consult your local php/mysql person

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

perka

  • Guest
Re: User Registration Profile "Could not find valid Key"
January 22, 2008, 02:43:47 pm
I have a UID 0
I have cacheing turned off
I have the same base URL for both drupal and civicrm.
But still I get "Could not find valid Key" every now and then.
And when I try to search "individials födelsedatum < YYYYMMDD" I get it everytime.
"födelsedatum" beceause I use a swedish locale, it means birth date.
Any more ideas?

--- edit

Ohh. and this is the backtrace in case it helps:

backTrace

/home/peaceque/public_html/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 255
/home/peaceque/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php, fatal, 182
/home/peaceque/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php, key, 136
/home/peaceque/public_html/sites/all/modules/civicrm/CRM/Contact/Controller/Search.php, __construct, 59
/home/peaceque/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, __construct, 457
/home/peaceque/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, search, 378
/home/peaceque/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, contact, 92
/home/peaceque/public_html/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 319
, civicrm_invoke,
/home/peaceque/public_html/includes/menu.inc, call_user_func_array, 418
/home/peaceque/public_html/index.php, menu_execute_active_handler, 15
« Last Edit: January 22, 2008, 03:04:38 pm by perka »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: User Registration Profile "Could not find valid Key"
January 22, 2008, 06:02:44 pm
I just tried the Search Builder "search" you specified below on our 1.9 demo after switching locale to Swedish - and it works properly. What version of CiviCRM are you using?

If you can recreate the issue on our demo - that would certainly help us figure it out. :-(
Protect your investment in CiviCRM by  becoming a Member!

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: User Registration Profile "Could not find valid Key"
May 06, 2008, 01:54:04 pm
Hello I found this topic when I searched for my error.  Even though it is an old post it had some valuable information.  I am setting up a new test site for a different client with CiviCRM.  Drupal 5.7, Civi 2.0.3.    Unfortunately, I am having this error every time I try to "Find Contacts" /civicrm/contact/search/basic?reset=1   

I have, as recommended on this post:

1) made sure the URL is the same on settings.php and civicrm.settings.php (minus the / difference)
2) Caching is "off" disabled
3) I made sure there is UID 0 in drupal 'users' table.

Again, I am consistently getting this error whenever I "Find Contacts" using the basic search, every single time.

Any ideas?


Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: User Registration Profile "Could not find valid Key"
May 07, 2008, 03:38:50 am

does it only happen with find contacts or other civicrm pages also? specifically things like new individual etc

can u also ensure that your drupal sessions table is utf8

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

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: User Registration Profile "Could not find valid Key"
May 07, 2008, 11:58:39 am
THANKS you rock!  I switched the drupal `sessions` table to utf_general_ci on all applicable fields and NOW it works!.  It was the default swedish.  The drupal was installed with Fantastico, maybe that is why.

Try CiviTeacher: the online video tutorial CiviCRM learning library.

perka

  • Guest
Re: User Registration Profile "Could not find valid Key"
May 08, 2008, 03:29:28 am
I tried changeing the sessions table "kollationering" to utf_general_ci, I still have the same problem though. Any other drupal tables that need to be changed?

speakingvolumes

  • Guest
Re: User Registration Profile "Could not find valid Key"
August 14, 2008, 04:51:54 am
Perka, I had the same problem, eventhough I applied the three suggestions above. I played around in PHPMyAdmin a little bit myself and my new user account creation seems to be working now...

I noticed that the UID field in the Users table had a default value of "0", and that didn't seem right to me as this ought to be a unique value for each user. I don't know how the default value got set like that, but as soon as I deleted that default value, I could create and save new users!
« Last Edit: August 14, 2008, 04:54:59 am by speakingvolumes »

Dara

  • Guest
Re: User Registration Profile "Could not find valid Key"
September 11, 2008, 10:46:19 am
I switched the drupal `sessions` table to utf_general_ci on all applicable fields and NOW it works!.  It was the default swedish.  The drupal was installed with Fantastico, maybe that is why.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • User Registration Profile "Could not find valid Key"

This forum was archived on 2017-11-26.