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) »
  • custom field error from 2.16 to 2.2.0
Pages: [1] 2

Author Topic: custom field error from 2.16 to 2.2.0  (Read 5682 times)

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
custom field error from 2.16 to 2.2.0
March 15, 2009, 08:38:45 pm
Page not found

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: no such field

    Database Error Code: Unknown column 'civicrm_custom_group.extends_entity_column_id' in 'field list', 1054

    Return to home page.

Error Details:

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

       
Code: [Select]
=> -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_parts as civicrm_custom_field_date_parts, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
 
WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Event')
  AND ( civicrm_custom_group.extends_entity_column_value = '5'
   OR   civicrm_custom_group.extends_entity_column_value IS NULL )
 AND civicrm_custom_group.style = 'Inline' AND civicrm_custom_group.id IN ( 2,6,3,4 ) 
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_group.extends_entity_column_id' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_parts as civicrm_custom_field_date_parts, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
 
WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Event')
  AND ( civicrm_custom_group.extends_entity_column_value = '5'
   OR   civicrm_custom_group.extends_entity_column_value IS NULL )
 AND civicrm_custom_group.style = 'Inline' AND civicrm_custom_group.id IN ( 2,6,3,4 ) 
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_group.extends_entity_column_id' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_parts as civicrm_custom_field_date_parts, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
 
WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Event')
  AND ( civicrm_custom_group.extends_entity_column_value = '5'
   OR   civicrm_custom_group.extends_entity_column_value IS NULL )
 AND civicrm_custom_group.style = 'Inline' AND civicrm_custom_group.id IN ( 2,6,3,4 ) 
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_group.extends_entity_column_id' in 'field list']"]
)

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: custom field error from 2.16 to 2.2.0
March 15, 2009, 10:25:37 pm
Can you provide detail steps to replicate this error..

Kurund
Found this reply helpful? Support CiviCRM

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: custom field error from 2.16 to 2.2.0
March 15, 2009, 11:11:51 pm
sonicthoughts,

No clue what would be causing this error. I think this was also reported elsewhere. If i have got it right this is after (or during) 2.1.6 to 2.2.0 upgrade error ?

Could you send us your 2.1.6 db dump to deepak (at webaccess dot co dot in), that will help us investigate the problem. We 'll make sure your db remains private and is deleted after the test.

thanks,
Deepak
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: custom field error from 2.16 to 2.2.0
March 16, 2009, 06:46:52 am
Ok, i will not be able to do this until later tonight.  Do you need the db structure or all data???

I had a 2.0 distribution and took the following steps:
1. ran civi update from 2.0 to 2.16 update.php ran fine, no errors.
2. enabled civicrm - no problem ran update in modules.
3. removed 2.16 and replaced with 2.2.0
4. ran civi update script and got the error.

Note, that i didn't disable civi (although nobody was using the test system) - i didn't see that explicit in the instructions.
Also, i have a problem with the drupal db (a separate db) where the cache table didn't have field called "serialized".  I'm still working on that and since it is a different database, i doubt that contributed. 

Do you have any idea what state my database build is in since it failed the update?  should i scrap it and start again?

thx,

s.

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: custom field error from 2.16 to 2.2.0
March 16, 2009, 07:28:20 am
Quote
Do you need the db structure or all data???
Both structure and data.

Quote
I had a 2.0 distribution and took the following steps:
1. ran civi update from 2.0 to 2.16 update.php ran fine, no errors.
2. enabled civicrm - no problem ran update in modules.
3. removed 2.16 and replaced with 2.2.0
4. ran civi update script and got the error.
Implies you had successful upgrade to 2.1.6 but something went wrong on the way to 2.2.0, and we want to figure out why.

Quote
Note, that i didn't disable civi (although nobody was using the test system)
Thats a right way to do.

Quote
Also, i have a problem with the drupal db (a separate db) where the cache table didn't have field called "serialized".  I'm still working on that and since it is a different database, i doubt that contributed.
Since civicrm upgrade has nothing to do with drupal db, it can't get affected anyway in that sense.

Quote
Do you have any idea what state my database build is in since it failed the update?  should i scrap it and start again?
IMO you had a healthy upgrade to 2.1.6 db. And looking at the error its only one missing column thats preventing you to start with 2.2 (which we are curious to figure out why/howcome) . So nothing major. Just send us your 2.1.6 db snapshot.
« Last Edit: March 16, 2009, 07:29:58 am by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: custom field error from 2.16 to 2.2.0
March 16, 2009, 08:02:22 am
sent.  thx!

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: custom field error from 2.16 to 2.2.0
March 17, 2009, 04:02:16 am
sonicthoughts,

We were able to upgrade the db to 2.2 without any problem.

I guess the problem in your case is with mysql version. What MySQL version you using ? Also update your profile.

If you have access to phpmyadmin could you confirm if the following query results in dropping "extends_entity_column_name" column and adding "extends_entity_column_id" column to the civicrm_custom_group table -
Code: [Select]
ALTER TABLE `civicrm_custom_group` CHANGE `extends_entity_column_name` `extends_entity_column_id` INT( 10 ) UNSIGNED NULL DEFAULT NULL COMMENT 'reference to option value';
If NOT problem is with mysql version not supporting the CHANGE statement.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: custom field error from 2.16 to 2.2.0
March 17, 2009, 11:09:16 am
I will try later.  We are using mySQL Server version: 5.0.67-community

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: custom field error from 2.16 to 2.2.0
March 17, 2009, 01:44:15 pm
I had this exact same error.

Like sonic, I was also upgrading from 2.1.6 to 2.2 on Drupal and I have MySQL Server version: 5.0.67-community

Apache version   2.2.11 (Unix)
PHP version   5.2.8

I am rolling back to 2.1.6 until a fix for this error can be found, until then upgrading for this particular site will have to wait.

Thanks.

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

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_parts as civicrm_custom_field_date_parts, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
 
WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Event')
  AND ( civicrm_custom_group.extends_entity_column_value = '7'
   OR   civicrm_custom_group.extends_entity_column_value IS NULL )
 AND civicrm_custom_group.style = 'Inline' AND civicrm_custom_group.id IN ( 2,1 ) 
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_group.extends_entity_column_id' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_parts as civicrm_custom_field_date_parts, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
 
WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Event')
  AND ( civicrm_custom_group.extends_entity_column_value = '7'
   OR   civicrm_custom_group.extends_entity_column_value IS NULL )
 AND civicrm_custom_group.style = 'Inline' AND civicrm_custom_group.id IN ( 2,1 ) 
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_group.extends_entity_column_id' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_parts as civicrm_custom_field_date_parts, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
 
WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Event')
  AND ( civicrm_custom_group.extends_entity_column_value = '7'
   OR   civicrm_custom_group.extends_entity_column_value IS NULL )
 AND civicrm_custom_group.style = 'Inline' AND civicrm_custom_group.id IN ( 2,1 ) 
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_group.extends_entity_column_id' in 'field list']"]
)


After rolling back to 2.1.6 I ran the query that you suggested to sonicthoughts, and the query was successful
Code: [Select]
Your SQL query has been executed successfully (Query took 0.1190 sec)
SQL query:
ALTER TABLE `civicrm_custom_group` CHANGE `extends_entity_column_name` `extends_entity_column_id` INT( 10 ) UNSIGNED NULL DEFAULT NULL COMMENT 'reference to option value';

I then rolled back a 2nd time to the pre-query/pre-upgrade 2.1.6 database and will await further news.[/code]
« Last Edit: March 17, 2009, 01:55:22 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: custom field error from 2.16 to 2.2.0
March 17, 2009, 05:38:56 pm

can we get ssh access to your machine along with a copy of your 2.1.6 db etc

ping us on IRC. We should be online after 8:00 pm PST

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

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: custom field error from 2.16 to 2.2.0
March 17, 2009, 08:34:26 pm
tried the Alter code above and got the following error (note it says "CiviCRM upgrade was successful":
Upgrade CiviCRM to Version 2.2.0

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    CiviCRM upgrade was successful.

    DB Error: no such field

    Database Error Code: Unknown column 'civicrm_custom_group.max_multiple' in 'field list', 1054

    Return to home page.

Error Details:

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

       
Code: [Select]
=> -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_parts as civicrm_custom_field_date_parts, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
 
WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Event')
  AND ( civicrm_custom_group.extends_entity_column_value = '5'
   OR   civicrm_custom_group.extends_entity_column_value IS NULL )
 AND civicrm_custom_group.style = 'Inline' AND civicrm_custom_group.id IN ( 2,6,3,4 ) 
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_group.max_multiple' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_parts as civicrm_custom_field_date_parts, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
 
WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Event')
  AND ( civicrm_custom_group.extends_entity_column_value = '5'
   OR   civicrm_custom_group.extends_entity_column_value IS NULL )
 AND civicrm_custom_group.style = 'Inline' AND civicrm_custom_group.id IN ( 2,6,3,4 ) 
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_group.max_multiple' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_parts as civicrm_custom_field_date_parts, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple
FROM     civicrm_custom_group
LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
 
WHERE civicrm_custom_group.is_active = 1
  AND civicrm_custom_field.is_active = 1
  AND civicrm_custom_group.extends IN ('Event')
  AND ( civicrm_custom_group.extends_entity_column_value = '5'
   OR   civicrm_custom_group.extends_entity_column_value IS NULL )
 AND civicrm_custom_group.style = 'Inline' AND civicrm_custom_group.id IN ( 2,6,3,4 ) 
ORDER BY civicrm_custom_group.weight,
         civicrm_custom_group.title,
         civicrm_custom_field.weight,
         civicrm_custom_field.label
 [nativecode=1054 ** Unknown column 'civicrm_custom_group.max_multiple' in 'field list']"]
)

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: custom field error from 2.16 to 2.2.0
March 18, 2009, 01:35:09 am
I think we have found the problem and the fix. Thanks to Stoob for helping us debug on his setup. 

The main problem which led to solution was - hitting "http://..civicrm/upgrade?reset=1" directly threw error and did not ask for confirmation. Whereas 2.2 upgrade is designed to initially ask for confirmation before starting / invoking the upgrade script.

And the reason for above unexpected behavior was following line in upgrade front end code -
Code: [Select]
CRM_Utils_System::theme( 'page', $content, true, $this->_print ); (further calling drupal's theme function).. which was some how (or indirectly) initiating another civicrm call which led to that fatal error since the db won't be an upgraded one at this moment.

I guess this behavior could be noticed in cases where a theme other than - default one or that comes with drupal, is being used.
 
Quick Solution -
replace following line in civicrm/CRM/Upgrade/Page/Upgrade.php (around line 131) before starting with upgrade
Code: [Select]
echo CRM_Utils_System::theme( 'page', $content, true, $this->_print );with :
Code: [Select]
echo $content;
« Last Edit: March 18, 2009, 02:20:18 am by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: custom field error from 2.16 to 2.2.0
March 18, 2009, 04:47:13 am
I tried the Alter suggestion and the database error still occurs.
made the change suggested to the upgrade script and then proceeded to upgrade (not that this is the same database that i previously upgraded...ie. re-ran it.) and i have the same error:


Quote
Upgrade CiviCRM to Version 2.2.0

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: no such field

    Database Error Code: Unknown column 'extends_entity_column_name' in 'civicrm_custom_group', 1054

    Return to home page.

Error Details:

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

       
Code: [Select]
=> -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => ALTER TABLE `civicrm_custom_group` CHANGE `extends_entity_column_name` `extends_entity_column_id` INT( 10 ) UNSIGNED NULL DEFAULT NULL COMMENT 'reference to option value' [nativecode=1054 ** Unknown column 'extends_entity_column_name' in 'civicrm_custom_group']
    [type] => DB_Error
    [user_info] => ALTER TABLE `civicrm_custom_group` CHANGE `extends_entity_column_name` `extends_entity_column_id` INT( 10 ) UNSIGNED NULL DEFAULT NULL COMMENT 'reference to option value' [nativecode=1054 ** Unknown column 'extends_entity_column_name' in 'civicrm_custom_group']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="ALTER TABLE `civicrm_custom_group` CHANGE `extends_entity_column_name` `extends_entity_column_id` INT( 10 ) UNSIGNED NULL DEFAULT NULL COMMENT 'reference to option value' [nativecode=1054 ** Unknown column 'extends_entity_column_name' in 'civicrm_custom_group']"]
)
[/quote]

should i re-run without the Alter on my original db?  appreciate the guidance. 

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: custom field error from 2.16 to 2.2.0
March 18, 2009, 05:29:54 am
Thats probably because you used the query i gave in one of my earlier post and the db is no longer original.

To undo that change use the following query (before re-starting with the upgrade) -
Code: [Select]
ALTER TABLE civicrm_custom_group ADD COLUMN  `extends_entity_column_name` varchar(64) default NULL COMMENT 'linking custom group for dynamic object';

OR use the unmodified 2.1.6 db ( recommended ).
« Last Edit: March 18, 2009, 05:31:52 am by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: custom field error from 2.16 to 2.2.0
March 18, 2009, 07:39:35 am
Same issue here on a site with a theme based on the Drupal Zen theme. This fix sorted it out:

Quote from: Deepak Srivastava on March 18, 2009, 01:35:09 am
Quick Solution -
replace following line in civicrm/CRM/Upgrade/Page/Upgrade.php (around line 131) before starting with upgrade
Code: [Select]
echo CRM_Utils_System::theme( 'page', $content, true, $this->_print );with :
Code: [Select]
echo $content;

Thanks,

Dave J

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • custom field error from 2.16 to 2.2.0

This forum was archived on 2017-11-26.