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) »
  • Upgrading 1.9 to 2.0.4 customs field error
Pages: [1]

Author Topic: Upgrading 1.9 to 2.0.4 customs field error  (Read 1384 times)

Rens

  • Guest
Upgrading 1.9 to 2.0.4 customs field error
June 12, 2008, 07:10:08 am
Hi All,

I have some problems with updating my civicrm from 1.9 to 2.0.4.
Every thing in the upgrate works fine untill i get to 'CiviCRM 2.0 Upgrade: Step Five (Custom Data Upgrade)'.

If i change the names of my customs fields so they don't contain '?' and don't become the same is shorten t
(on by new civicrm questions where shortent if to long),  the upgrade works fine and i get past step 5.

But now when i search for a user the custom field label is displayed in his profile 'Custom data'. and not the names i gave the customs fields for the registration form.

example:
Registration form:
   What is your main focus? -> radiobutton

Custom data:
   What_is_your_main_focus -> radiobutton

How can i get the same form names as on my registration form if i search for a user?

regards
Renze
   

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Upgrading 1.9 to 2.0.4 customs field error
June 12, 2008, 08:12:17 am
Once you done with upgrade you can put any special characters back into "label" field of civicrm_custom_field table and it will work fine.

The problem actually occurs for cases where custom field name is null in the db and the upgrade script tries to derive that name from the label having special characters. The new derived name is used as a column name for a table, which is not allowed to have any special characters and is the reason you noticed that error during upgrade.

So the other way solving this is: before doing upgrade check for any existence of null values for "name" column of "civicrm_custom_field" table and give them simple names ( underscores are allowed ). Note you will not need to modify your existing labels.
« Last Edit: June 12, 2008, 11:09:50 am by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

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

This forum was archived on 2017-11-26.