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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Could not find valid Key
Pages: [1]

Author Topic: Could not find valid Key  (Read 2549 times)

gmasky

  • Guest
Could not find valid Key
December 02, 2007, 06:37:39 pm
I have Drupal 4.7 and Civicrm 1.7 on our live site.

I have installed on localhost Drupal 5.3 and Civicrm 1.9 (latest). I imported/upgraded the datatbases (drupal and civicrm) and the files folder from my live site. I was having issues with OG on the live site which have now gone away.

Whenever an anonymous user tries to register/create an account I am still getting the error
Sorry. A non-recoverable error has occurred. Could not find valid Key Return to CiviCRM menu..

The direct consequence is that new users cannot register on the site. If I disable the civicrm module the registration happens. However this is not an option as all our profiles exist in civicrm.

I will appreciate any help.

BTW If can a field within a profile be used within another profile? This latest build of 1.9 seems much slower on localhost.

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: Could not find valid Key
December 03, 2007, 02:50:52 am
did you look at the other posts for "Could not find valid Key" in the forum. Seems that others have hit this and resolved it.

http://forum.civicrm.org/index.php/topic,114.msg403.html#msg403
 
does this help?

gmasky

  • Guest
Re: Could not find valid Key
December 03, 2007, 09:28:03 am
Hi speleo,

Thanks for the pointer. However it did not work.

1. I emptied drupal sessions and cache

2. I cleared my browser cache

3. I deleted files and directories under template_c

4. I ensured urls in settings, civicrm.settings and global settings were in the format http://www.mysite.com

I am still getting the error when a user tries to create an account.

In the past I have made changes to profiles. I have Profile 1, Profile 2 and Profile 3 which appear in the registration form. I had moved a field in profile 3 into Profile 2 and disabled Profile 3. Could this be the cause of the problem?  I tried going back to my original setup but it does not work.

As I said before disabling civicrm allows registrations to happen but is not an option I have.

Thanks

gmasky

  • Guest
Re: Could not find valid Key
December 03, 2007, 09:56:56 am
backTrace from localhost

Any help will be highly appreciated?

Quote
backTrace

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Core\Error.php, backtrace, 255
C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Core\Controller.php, fatal, 182
C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Core\Controller.php, key, 136
C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Core\Controller\Simple.php, __construct, 59
C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Core\BAO\UFGroup.php, __construct, 461
C:\xampp\htdocs\alumni\sites\all\modules\civicrm\drupal\civicrm.module, getEditHTML, 484
C:\xampp\htdocs\alumni\sites\all\modules\civicrm\drupal\civicrm.module, civicrm_register_data, 389
, civicrm_user,
C:\xampp\htdocs\alumni\includes\module.inc, call_user_func_array, 386
C:\xampp\htdocs\alumni\modules\user\user.module, module_invoke, 2449
C:\xampp\htdocs\alumni\modules\user\user.module, _user_forms, 1190
, user_register,
C:\xampp\htdocs\alumni\includes\form.inc, call_user_func_array, 217
, drupal_retrieve_form,
C:\xampp\htdocs\alumni\includes\form.inc, call_user_func_array, 68
, drupal_get_form,
C:\xampp\htdocs\alumni\includes\menu.inc, call_user_func_array, 418
C:\xampp\htdocs\alumni\index.php, menu_execute_active_handler, 15
« Last Edit: December 03, 2007, 10:12:54 am by gmasky »

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: Could not find valid Key
December 03, 2007, 11:06:09 am

check if you have drupal caching enabled. you might also want to consider upgrading to drupal 5.3


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

gmasky

  • Guest
Re: Could not find valid Key
December 03, 2007, 05:32:58 pm
Drupal cache is disabled. This is on localhost Drupal 5.3 and Civicrm 1.9 latest

Any help resolving this will be appreciated.

Thanks

gmasky

  • Guest
Re: Could not find valid Key-some progress and errors
December 04, 2007, 09:42:22 am
I found that uid=0 (anonymous user) had disappeared from my database. I created uid=0. A user registering sees the errors below. The account is created  but the drupal process of sending out an email to user and admin does not take place.

I will appreciate any help in understanding these errors and finding a solution. 

I am running Drupal 5.3 and civicrm 1.9 latest on localhost.

Under "User Account"

Quote
    * warning: Invalid argument supplied for foreach() in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 226.
    * warning: implode() [function.implode]: Bad arguments. in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 232.
    * warning: Invalid argument supplied for foreach() in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 243.
    * warning: Invalid argument supplied for foreach() in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 226.
    * warning: implode() [function.implode]: Bad arguments. in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 232.
    * warning: Invalid argument supplied for foreach() in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 243.
    * warning: Invalid argument supplied for foreach() in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 226.
    * warning: implode() [function.implode]: Bad arguments. in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 232.
    * warning: Invalid argument supplied for foreach() in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 243.
    * warning: Invalid argument supplied for foreach() in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 226.
    * warning: implode() [function.implode]: Bad arguments. in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 232.
    * warning: Invalid argument supplied for foreach() in

C:\xampp\htdocs\alumni\sites\all\modules\civicrm\CRM\Contribute\BAO\Query.php on line 243.

Below this

Quote
Sorry. A non-recoverable error has occurred.

Database Error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for

the right syntax to use near ') OR ( contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name' at line 11,

1064

Return to home page.

and finally

Error Details:

Code: [Select]
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => SELECT
                    civicrm_group_contact.id as civicrm_group_contact_id,
                    civicrm_group.title as group_title,
                    civicrm_group.visibility as visibility,
                    civicrm_group_contact.status as status,
                    civicrm_group.id as group_id,
                    civicrm_subscription_history.date as date,
                    civicrm_subscription_history.method as method FROM civicrm_contact contact_a LEFT JOIN civicrm_individual

ON (contact_a.id = civicrm_individual.contact_id)  LEFT JOIN civicrm_location ON (civicrm_location.entity_table =

'civicrm_contact' AND
                                                           contact_a.id = civicrm_location.entity_id AND

civicrm_location.is_primary = 1) LEFT JOIN civicrm_address ON civicrm_location.id = civicrm_address.location_id  LEFT JOIN

civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id  LEFT JOIN civicrm_country ON

civicrm_address.country_id = civicrm_country.id  LEFT JOIN civicrm_email ON (civicrm_location.id = civicrm_email.location_id

AND civicrm_email.is_primary = 1)  LEFT JOIN civicrm_phone ON (civicrm_location.id = civicrm_phone.location_id AND

civicrm_phone.is_primary = 1)  LEFT JOIN civicrm_im ON (civicrm_location.id = civicrm_im.location_id AND

civicrm_im.is_primary = 1)  LEFT JOIN civicrm_group_contact ON contact_a.id = civicrm_group_contact.contact_id  LEFT JOIN

civicrm_group ON civicrm_group.id =  civicrm_group_contact.group_id  LEFT JOIN civicrm_subscription_history
                                   ON civicrm_group_contact.contact_id = civicrm_subscription_history.contact_id
                                  AND civicrm_group_contact.group_id   =  civicrm_subscription_history.group_id LEFT JOIN

civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id  LEFT JOIN civicrm_option_group option_group_gender ON

(option_group_gender.name = 'gender') LEFT JOIN civicrm_option_value gender ON (civicrm_individual.gender_id = gender.value

AND option_group_gender.id = gender.option_group_id)  WHERE contact_a.id = 677 AND civicrm_group.is_active = 1  AND

civicrm_group_contact.status = 'Added' AND  (  ( civicrm_group_contact.group_id IN (42, 3, 45, 51, 36, 28, 65, 26, 34, 39,

56, 4, 21, 43, 53, 32, 20, 19, 13, 17, 38, 5, 46, 8, 41, 74, 16, 33, 49, 9, 10, 50, 11, 40, 12, 48, 52, 18, 54, 35, 37, 44,

29, 23, 22, 24, 47, 31, 15, 30, 25, 70, 55, 27, 59, 69, 6, 14, 7, 2, 63, 62, 64, 73, 68, 72, 61, 67 ) AND

civicrm_group_contact.status = 'Added' )  OR  ( contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name) = ''

AND civicrm_contribution.contribution_status_id =  )  OR  ( contact_a.contact_type IN ('Individual') AND

LOWER(civicrm_country.name) = '' AND civicrm_contribution.contribution_status_id =  )  OR  ( contact_a.contact_type IN

('Individual') AND LOWER(civicrm_country.name) = 'india' AND civicrm_contribution.contribution_status_id =  )  OR  (

contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name) = '' )  OR  ( contact_a.contact_type IN

('Individual') AND LOWER(civicrm_country.name) = '' )  OR  ( contact_a.contact_type IN ('Individual') AND

LOWER(civicrm_country.name) = '' )  OR  ( contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name) = 'united

states' AND civicrm_contribution.contribution_status_id =  )  )   ORDER BY civicrm_group.title  [nativecode=1064 ** You have

an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

')  OR  ( contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name' at line 11]
    [type] => DB_Error
    [user_info] => SELECT
                    civicrm_group_contact.id as civicrm_group_contact_id,
                    civicrm_group.title as group_title,
                    civicrm_group.visibility as visibility,
                    civicrm_group_contact.status as status,
                    civicrm_group.id as group_id,
                    civicrm_subscription_history.date as date,
                    civicrm_subscription_history.method as method FROM civicrm_contact contact_a LEFT JOIN civicrm_individual

ON (contact_a.id = civicrm_individual.contact_id)  LEFT JOIN civicrm_location ON (civicrm_location.entity_table =

'civicrm_contact' AND
                                                           contact_a.id = civicrm_location.entity_id AND

civicrm_location.is_primary = 1) LEFT JOIN civicrm_address ON civicrm_location.id = civicrm_address.location_id  LEFT JOIN

civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id  LEFT JOIN civicrm_country ON

civicrm_address.country_id = civicrm_country.id  LEFT JOIN civicrm_email ON (civicrm_location.id = civicrm_email.location_id

AND civicrm_email.is_primary = 1)  LEFT JOIN civicrm_phone ON (civicrm_location.id = civicrm_phone.location_id AND

civicrm_phone.is_primary = 1)  LEFT JOIN civicrm_im ON (civicrm_location.id = civicrm_im.location_id AND

civicrm_im.is_primary = 1)  LEFT JOIN civicrm_group_contact ON contact_a.id = civicrm_group_contact.contact_id  LEFT JOIN

civicrm_group ON civicrm_group.id =  civicrm_group_contact.group_id  LEFT JOIN civicrm_subscription_history
                                   ON civicrm_group_contact.contact_id = civicrm_subscription_history.contact_id
                                  AND civicrm_group_contact.group_id   =  civicrm_subscription_history.group_id LEFT JOIN

civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id  LEFT JOIN civicrm_option_group option_group_gender ON

(option_group_gender.name = 'gender') LEFT JOIN civicrm_option_value gender ON (civicrm_individual.gender_id = gender.value

AND option_group_gender.id = gender.option_group_id)  WHERE contact_a.id = 677 AND civicrm_group.is_active = 1  AND

civicrm_group_contact.status = 'Added' AND  (  ( civicrm_group_contact.group_id IN (42, 3, 45, 51, 36, 28, 65, 26, 34, 39,

56, 4, 21, 43, 53, 32, 20, 19, 13, 17, 38, 5, 46, 8, 41, 74, 16, 33, 49, 9, 10, 50, 11, 40, 12, 48, 52, 18, 54, 35, 37, 44,

29, 23, 22, 24, 47, 31, 15, 30, 25, 70, 55, 27, 59, 69, 6, 14, 7, 2, 63, 62, 64, 73, 68, 72, 61, 67 ) AND

civicrm_group_contact.status = 'Added' )  OR  ( contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name) = ''

AND civicrm_contribution.contribution_status_id =  )  OR  ( contact_a.contact_type IN ('Individual') AND

LOWER(civicrm_country.name) = '' AND civicrm_contribution.contribution_status_id =  )  OR  ( contact_a.contact_type IN

('Individual') AND LOWER(civicrm_country.name) = 'india' AND civicrm_contribution.contribution_status_id =  )  OR  (

contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name) = '' )  OR  ( contact_a.contact_type IN

('Individual') AND LOWER(civicrm_country.name) = '' )  OR  ( contact_a.contact_type IN ('Individual') AND

LOWER(civicrm_country.name) = '' )  OR  ( contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name) = 'united

states' AND civicrm_contribution.contribution_status_id =  )  )   ORDER BY civicrm_group.title  [nativecode=1064 ** You have

an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

')  OR  ( contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name' at line 11]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle

prefix="" info="SELECT
                    civicrm_group_contact.id as civicrm_group_contact_id,
                    civicrm_group.title as group_title,
                    civicrm_group.visibility as visibility,
                    civicrm_group_contact.status as status,
                    civicrm_group.id as group_id,
                    civicrm_subscription_history.date as date,
                    civicrm_subscription_history.method as method FROM civicrm_contact contact_a LEFT JOIN civicrm_individual

ON (contact_a.id = civicrm_individual.contact_id)  LEFT JOIN civicrm_location ON (civicrm_location.entity_table =

'civicrm_contact' AND
                                                           contact_a.id = civicrm_location.entity_id AND

civicrm_location.is_primary = 1) LEFT JOIN civicrm_address ON civicrm_location.id = civicrm_address.location_id  LEFT JOIN

civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id  LEFT JOIN civicrm_country ON

civicrm_address.country_id = civicrm_country.id  LEFT JOIN civicrm_email ON (civicrm_location.id = civicrm_email.location_id

AND civicrm_email.is_primary = 1)  LEFT JOIN civicrm_phone ON (civicrm_location.id = civicrm_phone.location_id AND

civicrm_phone.is_primary = 1)  LEFT JOIN civicrm_im ON (civicrm_location.id = civicrm_im.location_id AND

civicrm_im.is_primary = 1)  LEFT JOIN civicrm_group_contact ON contact_a.id = civicrm_group_contact.contact_id  LEFT JOIN

civicrm_group ON civicrm_group.id =  civicrm_group_contact.group_id  LEFT JOIN civicrm_subscription_history
                                   ON civicrm_group_contact.contact_id = civicrm_subscription_history.contact_id
                                  AND civicrm_group_contact.group_id   =  civicrm_subscription_history.group_id LEFT JOIN

civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id  LEFT JOIN civicrm_option_group option_group_gender ON

(option_group_gender.name = 'gender') LEFT JOIN civicrm_option_value gender ON (civicrm_individual.gender_id = gender.value

AND option_group_gender.id = gender.option_group_id)  WHERE contact_a.id = 677 AND civicrm_group.is_active = 1  AND

civicrm_group_contact.status = 'Added' AND  (  ( civicrm_group_contact.group_id IN (42, 3, 45, 51, 36, 28, 65, 26, 34, 39,

56, 4, 21, 43, 53, 32, 20, 19, 13, 17, 38, 5, 46, 8, 41, 74, 16, 33, 49, 9, 10, 50, 11, 40, 12, 48, 52, 18, 54, 35, 37, 44,

29, 23, 22, 24, 47, 31, 15, 30, 25, 70, 55, 27, 59, 69, 6, 14, 7, 2, 63, 62, 64, 73, 68, 72, 61, 67 ) AND

civicrm_group_contact.status = 'Added' )  OR  ( contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name) = ''

AND civicrm_contribution.contribution_status_id =  )  OR  ( contact_a.contact_type IN ('Individual') AND

LOWER(civicrm_country.name) = '' AND civicrm_contribution.contribution_status_id =  )  OR  ( contact_a.contact_type IN

('Individual') AND LOWER(civicrm_country.name) = 'india' AND civicrm_contribution.contribution_status_id =  )  OR  (

contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name) = '' )  OR  ( contact_a.contact_type IN

('Individual') AND LOWER(civicrm_country.name) = '' )  OR  ( contact_a.contact_type IN ('Individual') AND

LOWER(civicrm_country.name) = '' )  OR  ( contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name) = 'united

states' AND civicrm_contribution.contribution_status_id =  )  )   ORDER BY civicrm_group.title  [nativecode=1064 ** You have

an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

')  OR  ( contact_a.contact_type IN ('Individual') AND LOWER(civicrm_country.name' at line 11]"]
[/code]

gmasky

  • Guest
Re: Could not find valid Key
December 05, 2007, 06:27:58 pm
It seems that after re-creating uid 0 most of my errors have gone away. Users can now create new accounts. One outstanding old problem is I cannot use a Profile with the Groups field as I get errors as listed previously. If I disable this profile everything works fine.If I use the groups field in any other profile I get errors. Any idea why the groups field is causing these errors??

One new issue on my live site is that now, admin cannot approve new accounts. I get a blank screen if I hit the submit button in the drupal user account screen. Anyone seen this before. I am quite sure it is not a memory issue as civicrm/drupal works fine otherwise.

If I change status to 1 in the user table I get the following error

 MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A' at line 1

Any help will he appreciated.
 

Thanx

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Could not find valid Key

This forum was archived on 2017-11-26.