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 (Moderator: Dave Greenberg) »
  • A non-recoverable error: Could not find valid value for ct
Pages: 1 [2]

Author Topic: A non-recoverable error: Could not find valid value for ct  (Read 30571 times)

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: A non-recoverable error: Could not find valid value for ct
September 15, 2007, 02:31:54 pm

That code seems buggy. I'll fix it in the 2.0 release. I'm not sure why those lines exist and will check out why and potentially delete it

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

sdybiec

  • Guest
Re: A non-recoverable error: Could not find valid value for ct
September 16, 2007, 07:39:20 pm
Following your suggestion to look further into how Drupal or a Drupal module might be implicated in somehow making the session unusable for CiviCRM, I started turning off Drupal modules.

It turns out that the SimpleNews module is the culprit. Perhaps it is doing something to the session that makes it unusable by CiviCRM. When I turn off this module, everything works.

For now I have a workaround of simply disabling SimpleNews. Since SimpleNews is used extensively on our site, I need to figure out what the conflict is and resolve it.

I'm assuming that somehow a session variable is getting stepped on --- perhaps the same variable is used for both. Are there other potential issues that I should look for? 

SimpleNews only modifies a couple session variables. Where can I find all the session variables that CiviCRM relies on?

$cott

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: A non-recoverable error: Could not find valid value for ct
September 16, 2007, 11:30:55 pm

As far as we are aware all CiviCRM session variables are scoped. Most of them are in the array element CiviCRM. A few created by HTML QuickForm Controller in the array element _CRM_* (there is one of those created for every form submitted)

So not sure how/why simplenews can step on a civicrm related variable

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

Martink

  • Guest
Re: A non-recoverable error: Could not find valid value for ct
September 17, 2007, 04:31:04 am
I had a "could not find valid value for ct" when tring to save changes to custom feilds at the same time as an authentication (403) issue on modifying notes. So I created an ACL with modify privileges which didn't fix my 403 error (still working on that) but did stop the ct error for some reason.

Sorry I can't work out the logic, but just incase it is of value to you guys.
I'm using Joomla 1.5 / php 5 and CiviCRM 1.8.


sdybiec

  • Guest
Re: A non-recoverable error: Could not find valid value for ct
September 18, 2007, 10:11:39 am
I've looked through the SimpleNews module and not surprisingly SimpleNews does not modify the scoped CiviCRM session variables. It uses session variables named 'messages', 'email', 'newsletter', 'simplenews_subscriptions_filter', and few others.

Through my work so far I haven't seen any modifications to the session that should cause CiviCRM to fail to read the session or find its scoped session variable. The sessions I've traced earlier in this thread all seem to have valid CiviCRM scoped variables, but CiviCRM is not able to read them. Some of these variables have full form data in them, but fail nonetheless.

The solutions discovered by those that encounted this problem are all different and no one has yet found root cause.

Since this problem has occurred intermittently for others, is it possible that the CiviCRM session logic is fragile? Not resilient to certain updates to the session?

$cott

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: A non-recoverable error: Could not find valid value for ct
September 18, 2007, 11:25:57 am

Scott:

So far we have have found out the root cause of session corruption for most of the cases posted. There are a few cases where we dont have enough information (yours / martin) to pursue / solve it completely. That said, CiviCRM is software, and does have bugs.

Also Drupal does not lock sessions (not advisable either). So we could also get into a situation as described here:

http://thwartedefforts.org/2006/11/11/race-conditions-with-ajax-and-php-sessions/

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

sdybiec

  • Guest
Re: A non-recoverable error: Could not find valid value for ct
September 18, 2007, 03:03:55 pm
I guess what I'm saying is that session corruption may be a mis-diagnosis for the problem I'm encountering.

I'm unable to find anything wrong with the sessions CiviCRM is getting from Drupal, with and without the SimpleNews module enabled. I've checked the matching braces/brackets in an editor for the CiviCRM scoped variable and can't find any issues. For some reason, CiviCRM seems to be looking up the scoped session, not finding it, then creating a new one --- even when a fully populated form is present.

Can you point me to the program where that decision is made and I'll keep pursuing the problem.

Thanks for your help. I think if this gets solved for me, then it will for others as well. I can easily replicate the problem, so problem determination is possible.

$cott

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: A non-recoverable error: Could not find valid value for ct
September 18, 2007, 07:40:10 pm

You might want to check CRM/Core/Session.php and CRM/Core/Form.php (which sets the session scope for the form)

I think the fact that:

a. CiviCRM works w/o SimpleNews

b. CiviCRM has session issues w SimpleNews

is probably a big clue about the problem. If you can get a session dump in the following places:

Render New Individual Page -> Session Dump (a)
Submit the Form -> Session Dump (b) -> CiviCRM processes etc -> Session Dump (c) -> redirect to GET
Session Dump (d) -> render the new page

if you can compare the session state for a,b,c,d with or without the simplenews module that will probably help you isolate and figure the problem.

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

number3

  • Guest
Re: A non-recoverable error: Could not find valid value for ct
September 21, 2007, 02:53:09 pm
Hello,

I was getting the same error.  I'm on CiviCRM 1.7 and I build a contact csv import module in Drupal (5.x).  When I tried to edit/save any of my imported contacts I would get "Could not find valid value for ct".

First of all, simplenews will cause that error to be thrown.  For some strange reason when you attempt to save a CiviContact record, with simplenews block enabled, the simplenews block will try to submit the block form.

So the first thing I did was disable the block.

The second thing you might have to do is to make sure all website, for the contact, have "http://" in front of the address.  I'm not sure if this is specifically a 1.7 thing, but if I tried to edit and save a contact with an address of www.google.ca I would get an error.  However editing a record with a site of http://www.google.ca will work like a charm.

I hope this saves everyone a lot of hair.  I've almost lost all of mine trying to find this.

Cheers,

vijai

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
A non-recoverable error: Could not find valid value for ct
December 27, 2007, 03:02:45 am
I don't have simplenews or web addresses for my contacts. I still see this error

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: A non-recoverable error: Could not find valid value for ct
January 10, 2008, 08:32:13 am
I reposted on a topic like this
I do not have Simple news either. (use to but it is disabled now)
http://forum.civicrm.org/index.php/topic,1965.0.html

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: A non-recoverable error: Could not find valid value for ct
May 16, 2008, 04:12:53 am
did this ever get solved?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: A non-recoverable error: Could not find valid value for ct
May 17, 2008, 08:58:36 am
If you're still having problems w/ this error message - it would be best if you started a new thread with all the specifics about when it occurs, what you've done to try and diagnose / debug (including investigating error logs), what version of CiviCRM / CMS / OS you're running, etc.
Protect your investment in CiviCRM by  becoming a Member!

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • A non-recoverable error: Could not find valid value for ct

This forum was archived on 2017-11-26.