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) »
  • 1.9 to 2.0: Custom Data Upgrade error
Pages: [1]

Author Topic: 1.9 to 2.0: Custom Data Upgrade error  (Read 1367 times)

Whygee

  • Guest
1.9 to 2.0: Custom Data Upgrade error
February 25, 2009, 03:21:12 pm
Hi,

I'm trying to upgrade CiviCRM 1.9 to 2.0 (so I can upgrade to 2.1). I completed the step 4 in the wiki successfully (Ensure Schema Integrity) but I keep getting this error : "Sorry. A non-recoverable error has occurred. DB Error: syntax error" (see below for details).

I see that this is related to the personalized field we use.

Is there something I could do to my DB that would allow me to complete the upgrade?

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

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] =>         ALTER TABLE civicrm_value_1_informations_compl_mentaires
        ADD COLUMN `n'est_plus_intéréssé_ou_pas_renouvelé` tinyint,
        ADD INDEX INDEX_n'est_plus_intéréssé_ou_pas_renouvelé ( n'est_plus_intéréssé_ou_pas_renouvelé ) [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 ''est_plus_intéréssé_ou_pas_renouvelé ( n'est_plus_intéréssé_ou_pas_renouv' at line 3]
    [type] => DB_Error
    [user_info] =>         ALTER TABLE civicrm_value_1_informations_compl_mentaires
        ADD COLUMN `n'est_plus_intéréssé_ou_pas_renouvelé` tinyint,
        ADD INDEX INDEX_n'est_plus_intéréssé_ou_pas_renouvelé ( n'est_plus_intéréssé_ou_pas_renouvelé ) [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 ''est_plus_intéréssé_ou_pas_renouvelé ( n'est_plus_intéréssé_ou_pas_renouv' at line 3]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="        ALTER TABLE civicrm_value_1_informations_compl_mentaires
        ADD COLUMN `n'est_plus_intéréssé_ou_pas_renouvelé` tinyint,
        ADD INDEX INDEX_n'est_plus_intéréssé_ou_pas_renouvelé ( n'est_plus_intéréssé_ou_pas_renouvelé ) [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 ''est_plus_intéréssé_ou_pas_renouvelé ( n'est_plus_intéréssé_ou_pas_renouv' at line 3]"]
)


PS: please note that those field are in French.[/code]
« Last Edit: February 25, 2009, 03:22:48 pm by Whygee »

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: 1.9 to 2.0: Custom Data Upgrade error
February 25, 2009, 06:03:10 pm

the easiest short term fix is for you to rename the 1.9 field: n'est_plus_intéréssé_ou_pas_renouvelé to an "english" name (i.e. no accents etc) and do the upgrade. Once the upgrade to 2.1 is done, you can rename it back. yes its a crappy hacky solution, but its easy :)

also can u try creating a custom group and field on our sandbox with accents etc. We sanitize the name before sending it off to mysql and i'm a bit surprised (and disappointed) that it did not work in your case. I just checked the 2.0 upgrade code and it seems like the upgrade code does not sanitize the field name properly

thanx

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

Whygee

  • Guest
Re: 1.9 to 2.0: Custom Data Upgrade error
February 26, 2009, 12:20:27 pm
Thanks, it worked.

I will now try to upgrade to 2.1

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • 1.9 to 2.0: Custom Data Upgrade error

This forum was archived on 2017-11-26.