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) »
  • Survey Error fix for CiviCRM 4.0.5
Pages: [1]

Author Topic: Survey Error fix for CiviCRM 4.0.5  (Read 346 times)

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Survey Error fix for CiviCRM 4.0.5
July 30, 2014, 07:08:28 am
Hello,

  We're having the same issue as documented in the jira issue
https://issues.civicrm.org/jira/browse/CRM-10268

However, the affected version it shows is for 4.1.0.

Is there a patch for 4.0.5 or list of file changes for 4.0.5

Thanks

Yashesh


shashikant

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
  • CiviCRM version: civicrm 4.1.3
  • CMS version: Drupal 6.26
  • MySQL version: Mysql 5.1.56
  • PHP version: PHP Version 5.3.6
Re: Survey Error fix for CiviCRM 4.0.5
August 18, 2014, 03:21:52 am
You can try these patches
civicrm/CRM/Campaign/Form/Task/Interview.php

Code: [Select]
--- Interview.php.ORG   2011-07-14 06:29:22.000000000 -0400                                                                                                           
+++ Interview.php       2014-08-18 05:45:37.000000000 -0400                                                                                                           
@@ -495,8 +495,8 @@
      CREATE TEMPORARY TABLE {$tempTableName} (                                                                                                                       
             id int unsigned NOT NULL AUTO_INCREMENT,                                                                                                                 
             survey_contact_id int unsigned NOT NULL,                                                                                                                 
-PRIMARY KEY ( id ),                                                                                                                                                   
- CONSTRAINT FK_civicrm_survey_respondent FOREIGN KEY (survey_contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE )";                                         
+PRIMARY KEY ( id )                                                                                                                                                   
+)";                                                                                                                                                                   
                 CRM_Core_DAO::executeQuery( $query );                                                                                                                 
                 $batch = 100;                                                                                                                                         
                 $insertedCount = 0;                                                                                                                                   

And
civicrm/CRM/Campaign/BAO/Query.php

Code: [Select]
--- Query.php.ORG       2011-03-14 18:30:42.000000000 -0400                                                                                                           
+++ Query.php   2014-08-18 05:50:50.000000000 -0400                                                                                                                   
@@ -482,8 +482,8 @@
      CREATE TEMPORARY TABLE {$tempTableName} (                                                                                                                       
             id int unsigned NOT NULL AUTO_INCREMENT,                                                                                                                 
             survey_contact_id int unsigned NOT NULL,                                                                                                                 
-PRIMARY KEY ( id ),                                                                                                                                                   
- CONSTRAINT FK_civicrm_survey_respondent FOREIGN KEY (survey_contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE )";                                         
+PRIMARY KEY ( id )                                                                                                                                                   
+)";                                                                                                                                                                   
                 CRM_Core_DAO::executeQuery( $query );                                                                                                                 
                                                                                                                                                                       
                 $batch = 100;                                               
                                                                                         

Thanks,
Shashikant

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: Survey Error fix for CiviCRM 4.0.5
August 18, 2014, 06:40:21 am
Thanks Shashikant for the detailed patch.

Yashesh

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Survey Error fix for CiviCRM 4.0.5

This forum was archived on 2017-11-26.