Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20873

CIVICRM-118 DB Error: no such field / Unknown column 'civicrm_custom_group.is_public' breaks CiviCRM database update process

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Important
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.19, 4.7.21, 4.7.20, 4.7.22
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      When performing a CiviCRM database upgrade from a prior version to CiviCRM 4.7.19 or newer .20, .21, .22 the following error is reported in the CiviCRM log file and the website and CiviCRM whitescreens. Leaving both website and CiviCRM in unusable states - the upgrade is broken.

      DB Error: no such field
      Unknown column 'civicrm_custom_group.is_public'

      This has been a consistently reproducible CiviCRM problem affecting multiple sites which we have upgraded to newer CiviCRM >= 4.7.19 versions.

      Important to note that this problem occurs on WordPress and Drupal sites.

      Manual solution

      1. In file, civicrm/CRM/Core/BAO/CustomGroup.php
      2. Comment out all references to is_public in the CustomGroup.php file
      3. Execute the CiviCRM database upgrade again
      4. Once this has completed, then remove the commented lines

      CiviCRM back trace log

      Jun 05 14:22:14  [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.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 ('Organization', 'Contact')
        AND (((civicrm_custom_group.extends_entity_column_value LIKE "%Prospect%"))  OR civicrm_custom_group.extends_entity_column_value IS NULL )
       AND civicrm_custom_group.id = 1 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.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 ('Organization', 'Contact')
        AND (((civicrm_custom_group.extends_entity_column_value LIKE "%Prospect%"))  OR civicrm_custom_group.extends_entity_column_value IS NULL )
       AND civicrm_custom_group.id = 1 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.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 ('Organization', 'Contact')
        AND (((civicrm_custom_group.extends_entity_column_value LIKE "%Prospect%"))  OR civicrm_custom_group.extends_entity_column_value IS NULL )
       AND civicrm_custom_group.id = 1 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']"]
      )
      

      Agileware Reference CIVICRM-118

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                monish.deb Monish Deb
                Reporter:
                agileware Agileware
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: