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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • CiviMember/custom field error after upgrade to 1.8
Pages: [1]

Author Topic: CiviMember/custom field error after upgrade to 1.8  (Read 2917 times)

alexlyn

  • Guest
CiviMember/custom field error after upgrade to 1.8
March 30, 2008, 06:36:17 am
HELP!!!

I am working my way towards 1.9, but have run into a critical issue following my upgrade to CiviCRM 1.8 with payment processing.

When members try to join or renew using paypal, the following error is generated.  The SQL syntax is indeed incorrect.  I can view the custom fields and values elsewhere in CiviCRM.

Any ideas?  Any help is much appreciated.

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => SELECT contact_a.id as contact_id, custom_value_1.id as custom_value_1_id, custom_value_1.int_data as custom_1, custom_value_3.id as custom_value_3_id, custom_value_3.char_data as custom_3, custom_value_4.id as custom_value_4_id, custom_value_4.char_data as custom_4  FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id 
LEFT JOIN civicrm_custom_value custom_value_1 ON custom_value_1.custom_field_id = 1 AND custom_value_1.entity_table = 'civicrm_contact' AND custom_value_1.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_3 ON custom_value_3.custom_field_id = 3 AND custom_value_3.entity_table = 'civicrm_contact' AND custom_value_3.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_4 ON custom_value_4.custom_field_id = 4 AND custom_value_4.entity_table = 'civicrm_contact' AND custom_value_4.entity_id = contact_a.id   WHERE  ( contact_a.id = 2 AND  civicrm_contribution.id =  )  AND  ( 1 )   ORDER BY contact_a.sort_name   [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 ')  AND  ( 1 )   ORDER BY contact_a.sort_name' at line 4]
    [type] => DB_Error
    [user_info] => SELECT contact_a.id as contact_id, custom_value_1.id as custom_value_1_id, custom_value_1.int_data as custom_1, custom_value_3.id as custom_value_3_id, custom_value_3.char_data as custom_3, custom_value_4.id as custom_value_4_id, custom_value_4.char_data as custom_4  FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id 
LEFT JOIN civicrm_custom_value custom_value_1 ON custom_value_1.custom_field_id = 1 AND custom_value_1.entity_table = 'civicrm_contact' AND custom_value_1.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_3 ON custom_value_3.custom_field_id = 3 AND custom_value_3.entity_table = 'civicrm_contact' AND custom_value_3.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_4 ON custom_value_4.custom_field_id = 4 AND custom_value_4.entity_table = 'civicrm_contact' AND custom_value_4.entity_id = contact_a.id   WHERE  ( contact_a.id = 2 AND  civicrm_contribution.id =  )  AND  ( 1 )   ORDER BY contact_a.sort_name   [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 ')  AND  ( 1 )   ORDER BY contact_a.sort_name' at line 4]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT contact_a.id as contact_id, custom_value_1.id as custom_value_1_id, custom_value_1.int_data as custom_1, custom_value_3.id as custom_value_3_id, custom_value_3.char_data as custom_3, custom_value_4.id as custom_value_4_id, custom_value_4.char_data as custom_4  FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id 
LEFT JOIN civicrm_custom_value custom_value_1 ON custom_value_1.custom_field_id = 1 AND custom_value_1.entity_table = 'civicrm_contact' AND custom_value_1.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_3 ON custom_value_3.custom_field_id = 3 AND custom_value_3.entity_table = 'civicrm_contact' AND custom_value_3.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_4 ON custom_value_4.custom_field_id = 4 AND custom_value_4.entity_table = 'civicrm_contact' AND custom_value_4.entity_id = contact_a.id   WHERE  ( contact_a.id = 2 AND  civicrm_contribution.id =  )  AND  ( 1 )   ORDER BY contact_a.sort_name   [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 ')  AND  ( 1 )   ORDER BY contact_a.sort_name' at line 4]"]
)

Alex.

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: CiviMember/custom field error after upgrade to 1.8
March 30, 2008, 11:07:24 am

You might want to continue upgrading all the way to 2.0 and see if that resovles the issue. Its also much easier for us to support / debug / fix issues in 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

alexlyn

  • Guest
Re: CiviMember/custom field error after upgrade to 1.8
March 30, 2008, 07:14:35 pm
Ok, thanks.  I will try upgrading to 1.9 tonight, but I can't go to 2.0 yet because my hoster, Site5, doesn't support MySQL 5 yet.

Alex.

alexlyn

  • Guest
Re: CiviMember/custom field error after upgrade to 1.8
March 30, 2008, 09:10:51 pm
I upgraded the site to 1.9.13019 tonight and I am still seeing the same problem.  Everything works fine except for the membership page.  When I try to renew my subscription using PayPal, I see the confirmation page, then when I select continue, I get the following error:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => SELECT contact_a.id as contact_id, custom_value_1.id as custom_value_1_id, custom_value_1.int_data as custom_1, custom_value_3.id as custom_value_3_id, custom_value_3.char_data as custom_3, custom_value_4.id as custom_value_4_id, custom_value_4.char_data as custom_4  FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id 
LEFT JOIN civicrm_custom_value custom_value_1 ON custom_value_1.custom_field_id = 1 AND custom_value_1.entity_table = 'civicrm_contact' AND custom_value_1.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_3 ON custom_value_3.custom_field_id = 3 AND custom_value_3.entity_table = 'civicrm_contact' AND custom_value_3.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_4 ON custom_value_4.custom_field_id = 4 AND custom_value_4.entity_table = 'civicrm_contact' AND custom_value_4.entity_id = contact_a.id   WHERE  ( contact_a.id = 2 AND  civicrm_contribution.id =  )  AND  ( 1 )   ORDER BY contact_a.sort_name   [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 ')  AND  ( 1 )   ORDER BY contact_a.sort_name' at line 4]
    [type] => DB_Error
    [user_info] => SELECT contact_a.id as contact_id, custom_value_1.id as custom_value_1_id, custom_value_1.int_data as custom_1, custom_value_3.id as custom_value_3_id, custom_value_3.char_data as custom_3, custom_value_4.id as custom_value_4_id, custom_value_4.char_data as custom_4  FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id 
LEFT JOIN civicrm_custom_value custom_value_1 ON custom_value_1.custom_field_id = 1 AND custom_value_1.entity_table = 'civicrm_contact' AND custom_value_1.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_3 ON custom_value_3.custom_field_id = 3 AND custom_value_3.entity_table = 'civicrm_contact' AND custom_value_3.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_4 ON custom_value_4.custom_field_id = 4 AND custom_value_4.entity_table = 'civicrm_contact' AND custom_value_4.entity_id = contact_a.id   WHERE  ( contact_a.id = 2 AND  civicrm_contribution.id =  )  AND  ( 1 )   ORDER BY contact_a.sort_name   [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 ')  AND  ( 1 )   ORDER BY contact_a.sort_name' at line 4]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT contact_a.id as contact_id, custom_value_1.id as custom_value_1_id, custom_value_1.int_data as custom_1, custom_value_3.id as custom_value_3_id, custom_value_3.char_data as custom_3, custom_value_4.id as custom_value_4_id, custom_value_4.char_data as custom_4  FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id 
LEFT JOIN civicrm_custom_value custom_value_1 ON custom_value_1.custom_field_id = 1 AND custom_value_1.entity_table = 'civicrm_contact' AND custom_value_1.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_3 ON custom_value_3.custom_field_id = 3 AND custom_value_3.entity_table = 'civicrm_contact' AND custom_value_3.entity_id = contact_a.id   
LEFT JOIN civicrm_custom_value custom_value_4 ON custom_value_4.custom_field_id = 4 AND custom_value_4.entity_table = 'civicrm_contact' AND custom_value_4.entity_id = contact_a.id   WHERE  ( contact_a.id = 2 AND  civicrm_contribution.id =  )  AND  ( 1 )   ORDER BY contact_a.sort_name   [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 ')  AND  ( 1 )   ORDER BY contact_a.sort_name' at line 4]"]
)



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: CiviMember/custom field error after upgrade to 1.8
March 30, 2008, 09:22:13 pm

can u enable backtrace (in administer civicrm >> global settings >> debugging) and give us the backtrace associated with this fatal error

I'm not sure we can reproduce and patch this since we only support the latest released version (which is currently 2.0). I'll look at the code and see if we can figure something out. kinda strange that no one ran into this issue with 1.9

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

alexlyn

  • Guest
Re: CiviMember/custom field error after upgrade to 1.8
March 31, 2008, 04:56:28 am
Thanks very much for your help! 

I removed the custom information from my membership form to see if that will help.  A fatal error is still generated when i attempt to renew a membership.  Here is the backtrace and error:

/home/catalina/public_html/modules/civicrm/CRM/Core/Error.php, backtrace, 148
, handle,
/home/catalina/public_html/modules/civicrm/packages/PEAR.php, call_user_func, 901
/home/catalina/public_html/modules/civicrm/packages/PEAR.php, PEAR_Error, 566
/home/catalina/public_html/modules/civicrm/packages/Net/SMTP.php, raiseError, 277
/home/catalina/public_html/modules/civicrm/packages/Net/SMTP.php, _parseResponse, 741
/home/catalina/public_html/modules/civicrm/packages/Mail/smtp.php, rcptTo, 288
/home/catalina/public_html/modules/civicrm/CRM/Utils/Mail.php, send, 153
/home/catalina/public_html/modules/civicrm/CRM/Contribute/BAO/ContributionPage.php, send, 129
/home/catalina/public_html/modules/civicrm/CRM/Member/BAO/Membership.php, sendMail, 907
/home/catalina/public_html/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php, postProcessMembership, 363
/home/catalina/public_html/modules/civicrm/CRM/Core/StateMachine.php, postProcess, 166
/home/catalina/public_html/modules/civicrm/CRM/Core/QuickForm/Action/Next.php, perform, 63
/home/catalina/public_html/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 195
/home/catalina/public_html/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 95
/home/catalina/public_html/modules/civicrm/CRM/Core/Controller.php, handle, 220
/home/catalina/public_html/modules/civicrm/CRM/Contribute/Invoke.php, run, 121
/home/catalina/public_html/modules/civicrm/CRM/Core/Component.php(183) : eval()'d code, main, 1
/home/catalina/public_html/modules/civicrm/CRM/Core/Component.php, eval, 183
/home/catalina/public_html/modules/civicrm/CRM/Core/Invoke.php, invoke, 144
/home/catalina/public_html/modules/civicrm/drupal/civicrm.module, invoke, 319
, civicrm_invoke,
/home/catalina/public_html/includes/menu.inc, call_user_func_array, 418
/home/catalina/public_html/index.php, menu_execute_active_handler, 15

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=>
    [message] => Invalid response code received from server
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="Invalid response code received from server" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)


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: CiviMember/custom field error after upgrade to 1.8
March 31, 2008, 11:23:03 am

The error you are getting now is due to bad SMTP settings. Please ensure that CiviCRM can send email before you try this out.

We'd definitely encourage you to move to 2.0. This is the supported version. Convince your host to upgrade and/or migrate to a different host :)

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • CiviMember/custom field error after upgrade to 1.8

This forum was archived on 2017-11-26.