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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • drupal caching & key not found error
Pages: [1]

Author Topic: drupal caching & key not found error  (Read 1812 times)

taram

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 2
drupal caching & key not found error
February 24, 2009, 11:33:45 am
Hi, our live site was having multiple key not found errors when a new org is being registered and I tracked down the problem to the drupal cache being turned on on this site. I found from the post http://forum.civicrm.org/index.php/topic,173.15.html that there was a patch where drupal caching is disabled for civi pages. This patch was put in civi 2.0 but there is a small bug when the patch was merged into civi 2.0.
The variable being used in controller.php->key() function is different from the one actually set in civicrm.module

civicrm.module:

function civicrm_key_disable( ) {
    $config =& CRM_Core_Config::singleton( );
    $config->formKeyDisable = true;
}


function key( $name, $addSequence = false, $ignoreKey = false ) {
.....

 if ( $ignoreKey ||
             ( isset( $config->keyDisable ) && $config->keyDisable ) ) {
            return null;
        }
.....
}

Once this is corrected, we do not see any errors on our site with the org registration.
How can this be corrected in the core?
Thanks.


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: drupal caching & key not found error
February 24, 2009, 11:54:16 am

i just checked the code for 2.1 and 2.2 and it seems to be right. the variable is referenced as keyDisable in both places

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

taram

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 2
Re: drupal caching & key not found error
February 24, 2009, 12:29:23 pm
It looks like 2.0 is using formKeyDisable:

http://svn.civicrm.org/civicrm/branches/v2.0/drupal/civicrm.module

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: drupal caching & key not found error
February 24, 2009, 01:50:30 pm

yes, but we no longer support or distribute versions of 2.0

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

taram

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 2
Re: drupal caching & key not found error
February 24, 2009, 08:12:25 pm
Got it. Thanks Lobo.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • drupal caching & key not found error

This forum was archived on 2017-11-26.