1

I'm administrating an not-often-maintained site and seeing that 4.7.14 is reaching end-of-life, i attempted to upgrade it to 5.9.1 (a brainless reckless move).

The upgrade went as usual but stopped progressing at "[info] Running task: Begin Upgrade to 4.7.19" for many minutes. I refreshed to main CiviCRM page and it throws "DB Error: no such field"

A look at the logs show that the error existed before the attempted upgrade.

    Jan 26 14:56:11  [info] $Fatal Error Details = Array
    (
        [callback] => Array
            (
                [0] => CRM_Core_Error
                [1] => exceptionHandler
            )

        [code] => -19
        [message] => DB Error: no such field
        [mode] => 16
        [debug_info] => SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`, a.title as `title`, a.frontend_title as `frontend_title`, a.description as `description`, a.help_pre as `help_pre`, a.help_post as `help_post`, a.limit_listings_group_id as `limit_listings_group_id`, a.post_URL as `post_URL`, a.add_to_group_id as `add_to_group_id`, a.add_captcha as `add_captcha`, a.is_map as `is_map`, a.is_edit_link as `is_edit_link`, a.is_uf_link as `is_uf_link`, a.is_update_dupe as `is_update_dupe`, a.cancel_URL as `cancel_URL`, a.is_cms_user as `is_cms_user`, a.notify as `notify`, a.is_reserved as `is_reserved`, a.name as `name`, a.created_id as `created_id`, a.created_date as `created_date`, a.is_proximity_search as `is_proximity_search`, a.cancel_button_text as `cancel_button_text`, a.submit_button_text as `submit_button_text`, a.add_cancel_button as `add_cancel_button`
    FROM civicrm_uf_group a
    WHERE (a.name IN ("new_individual", "new_organization", "new_household")) AND (a.is_active = "1")
    LIMIT 25
    OFFSET 0
     [nativecode=1054 ** Unknown column 'a.frontend_title' in 'field list']
        [type] => DB_Error
        [user_info] => SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`, a.title as `title`, a.frontend_title as `frontend_title`, a.description as `description`, a.help_pre as `help_pre`, a.help_post as `help_post`, a.limit_listings_group_id as `limit_listings_group_id`, a.post_URL as `post_URL`, a.add_to_group_id as `add_to_group_id`, a.add_captcha as `add_captcha`, a.is_map as `is_map`, a.is_edit_link as `is_edit_link`, a.is_uf_link as `is_uf_link`, a.is_update_dupe as `is_update_dupe`, a.cancel_URL as `cancel_URL`, a.is_cms_user as `is_cms_user`, a.notify as `notify`, a.is_reserved as `is_reserved`, a.name as `name`, a.created_id as `created_id`, a.created_date as `created_date`, a.is_proximity_search as `is_proximity_search`, a.cancel_button_text as `cancel_button_text`, a.submit_button_text as `submit_button_text`, a.add_cancel_button as `add_cancel_button`
    FROM civicrm_uf_group a
    WHERE (a.name IN ("new_individual", "new_organization", "new_household")) AND (a.is_active = "1")
    LIMIT 25
    OFFSET 0
     [nativecode=1054 ** Unknown column 'a.frontend_title' in 'field list']
        [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`, a.title as `title`, a.frontend_title as `frontend_title`, a.description as `description`, a.help_pre as `help_pre`, a.help_post as `help_post`, a.limit_listings_group_id as `limit_listings_group_id`, a.post_URL as `post_URL`, a.add_to_group_id as `add_to_group_id`, a.add_captcha as `add_captcha`, a.is_map as `is_map`, a.is_edit_link as `is_edit_link`, a.is_uf_link as `is_uf_link`, a.is_update_dupe as `is_update_dupe`, a.cancel_URL as `cancel_URL`, a.is_cms_user as `is_cms_user`, a.notify as `notify`, a.is_reserved as `is_reserved`, a.name as `name`, a.created_id as `created_id`, a.created_date as `created_date`, a.is_proximity_search as `is_proximity_search`, a.cancel_button_text as `cancel_button_text`, a.submit_button_text as `submit_button_text`, a.add_cancel_button as `add_cancel_button`
    FROM civicrm_uf_group a
    WHERE (a.name IN ("new_individual", "new_organization", "new_household")) AND (a.is_active = "1")
    LIMIT 25
    OFFSET 0
     [nativecode=1054 ** Unknown column 'a.frontend_title' in 'field list']"]
    )

Followed by site specific logs, and my attempt to upgrade.

    Jan 26 14:56:14  [info] Running task: Cleanup old files
    Jan 26 14:56:16  [info] Running task: Begin Upgrade to 4.7.15
    //upgrades text in between.
    Jan 26 14:56:59  [info] Running task: Finish Upgrade DB to 4.7.18
    Jan 26 14:57:01  [info] Running task: Begin Upgrade to 4.7.19

    Jan 26 14:57:04  [info] $Fatal Error Details = 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.name as civicrm_custom_field_name, 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_pre as civicrm_custom_field_help_pre, 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_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, 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.style as civicrm_custom_group_style, 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, civicrm_custom_group.is_public as civicrm_custom_group_is_public 
    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 ('Individual', 'Contact')
    AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 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.is_public' in 'field list']
        [type] => DB_Error
        [user_info] => SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.name as civicrm_custom_field_name, 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_pre as civicrm_custom_field_help_pre, 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_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, 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.style as civicrm_custom_group_style, 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, civicrm_custom_group.is_public as civicrm_custom_group_is_public 
    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 ('Individual', 'Contact')
    AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 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.is_public' 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.name as civicrm_custom_field_name, 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_pre as civicrm_custom_field_help_pre, 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_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, 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.style as civicrm_custom_group_style, 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, civicrm_custom_group.is_public as civicrm_custom_group_is_public 
    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 ('Individual', 'Contact')
    AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 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.is_public' in 'field list']"]
    )

civicrm_uf_group.frontend_title exists in table and is all 'NULL' civicrm_custom_group.is_public exists in table and is all '1' No triggers in both tables. Logging is disabled.

I will appreciate any help and suggestions on next steps to take. For example, how do i downgrade back to 4.7.14?

  • And due to the error, I got the following message when i attempted to upgrade to 5.9.1. "Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again." – humanistsg Jan 26 at 17:13
  • When you say the field exists in the table - is it possible the config is pointing to a different database than the one you're looking at? Check in civicrm.settings.php. – Demerit Jan 26 at 21:11
  • @Demerit you're right. Going on your lead, I found out that I had separated CiviCRM DB from Wordpress DB a while ago, but the current civicrm.settings.php does not point to the CiviCRM DB. Could be due to my negligence during one of the previous upgrades. Data is back on the plugin, I just need to figure out how to upgrade safely now. – humanistsg Jan 27 at 10:32
  • 2
    (I apologize if I can not comment, I do not have 50 points yet) @humanistsg - I have the exact same problem with the exact same error. I also updated (a long time ago) CiviCRM on Wordpress from version 4.7.19 to version 5.3.1 and now it is no longer possible to update beyond version 5.3.2 Did you solve it in any way? Thank you. – Alessandro Letizia Feb 7 at 20:59
  • Alessandro - I +1'd your Answer so you are now on 51, then converted it to a Comment. – petednz - fuzion Feb 13 at 20:40
2

Going on @Demerit 's lead, I found out that I had separated CiviCRM DB from Wordpress DB a while ago, but the current civicrm.settings.php does not point to the CiviCRM DB. Could be due to my negligence during one of the previous upgrades. Data is back on the plugin, I just need to figure out how to upgrade safely now. - DB is marked 5.3.1 for some reasons. I'll figure that out later.

1

I think you should try upgrading CiviCRM to 4.7.30 first and then to 5.9.1. The missing fields were added in 4.7.31 and there might be some updates to profile in 4.7.19 upgrade that is causing problem during upgrade.

  • Thanks @FullStack-Dev , i will take that advice and upgrade incrementally. The main problem was solved by changing the DB pointer to the right one in civicrm.settings.php . Now i just need to figure out why my DB is marked for 5.3.1 and wouldn't upgrade easily. – humanistsg Jan 27 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.