Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Translation
Translation
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 28
    • Issues 28
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • TranslationTranslation
  • Issues
  • #38

Closed
Open
Opened Mar 05, 2020 by darren.woods@darren.woods

Unable to add new custom field set or new fields (to existing field set) after enabling multilingual setting.

Reproduced on demo site https://dmaster.demo.civicrm.org/ running 5.24.alpha1 and also 5.21.1

  1. Settings - Localization - enable Multilingual setting.
  2. Custom Data - Add set of custom fields.
  3. Enter "Set Name" and select "Used For", click "Save"

Error returned:-

Database Error Code: Field of view 'dmastercivi_g5lis.civicrm_custom_group_en_US' underlying table doesn't have a default value, 1423

Additional Details: ` Array ( [callback] => Array ( [0] => CRM_Core_Error [1] => handle )

[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => INSERT INTO `civicrm_custom_group_en_US` (`name` , `title` , `extends` , `extends_entity_column_id` , `extends_entity_column_value` , `style` , `collapse_display` , `help_pre` , `help_post` , `weight` , `is_active` , `is_multiple` , `max_multiple` , `created_id` , `created_date` , `is_public` ) VALUES ('test' , 'test' , 'Contact' ,  NULL ,  NULL , 'Inline' ,  1 , '' , '' ,  6 ,  1 ,  0 ,  NULL ,  203 ,  20200305111654 ,  1 )  [nativecode=1423 ** Field of view 'dmastercivi_g5lis.civicrm_custom_group_en_US' underlying table doesn't have a default value]
[type] => DB_Error
[user_info] => INSERT INTO `civicrm_custom_group_en_US` (`name` , `title` , `extends` , `extends_entity_column_id` , `extends_entity_column_value` , `style` , `collapse_display` , `help_pre` , `help_post` , `weight` , `is_active` , `is_multiple` , `max_multiple` , `created_id` , `created_date` , `is_public` ) VALUES ('test' , 'test' , 'Contact' ,  NULL ,  NULL , 'Inline' ,  1 , '' , '' ,  6 ,  1 ,  0 ,  NULL ,  203 ,  20200305111654 ,  1 )  [nativecode=1423 ** Field of view 'dmastercivi_g5lis.civicrm_custom_group_en_US' underlying table doesn't have a default value]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO `civicrm_custom_group_en_US` (`name` , `title` , `extends` , `extends_entity_column_id` , `extends_entity_column_value` , `style` , `collapse_display` , `help_pre` , `help_post` , `weight` , `is_active` , `is_multiple` , `max_multiple` , `created_id` , `created_date` , `is_public` ) VALUES ('test' , 'test' , 'Contact' ,  NULL ,  NULL , 'Inline' ,  1 , '' , '' ,  6 ,  1 ,  0 ,  NULL ,  203 ,  20200305111654 ,  1 )  [nativecode=1423 ** Field of view 'dmastercivi_g5lis.civicrm_custom_group_en_US' underlying table doesn't have a default value]"]

) `

Also unable to add new fields to existing sets.

  1. Open exiting field set
  2. Click "Add custom field"
  3. Enter Label
  4. Click "Save"

Error details:-

Database Error Code: Field of view 'dmastercivi_g5lis.civicrm_custom_field_en_US' underlying table doesn't have a default value, 1423

Additional Details:

`Array ( [callback] => Array ( [0] => CRM_Core_Error [1] => handle )

[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => INSERT INTO `civicrm_custom_field_en_US` (`custom_group_id` , `name` , `label` , `data_type` , `html_type` , `default_value` , `is_required` , `is_searchable` , `is_search_range` , `weight` , `help_pre` , `help_post` , `is_active` , `is_view` , `options_per_line` , `text_length` , `start_date_years` , `end_date_years` , `date_format` , `time_format` , `note_columns` , `note_rows` , `column_name` , `option_group_id` , `filter` , `in_selector` ) VALUES ( 7 , 'test' , 'test' , 'String' , 'Text' ,  NULL ,  NULL ,  NULL ,  0 ,  2 ,  NULL ,  NULL ,  1 ,  NULL ,  NULL ,  255 ,  NULL ,  NULL ,  NULL ,  NULL ,  60 ,  4 , 'test' ,  NULL ,  NULL ,  0 )  [nativecode=1423 ** Field of view 'dmastercivi_g5lis.civicrm_custom_field_en_US' underlying table doesn't have a default value]
[type] => DB_Error
[user_info] => INSERT INTO `civicrm_custom_field_en_US` (`custom_group_id` , `name` , `label` , `data_type` , `html_type` , `default_value` , `is_required` , `is_searchable` , `is_search_range` , `weight` , `help_pre` , `help_post` , `is_active` , `is_view` , `options_per_line` , `text_length` , `start_date_years` , `end_date_years` , `date_format` , `time_format` , `note_columns` , `note_rows` , `column_name` , `option_group_id` , `filter` , `in_selector` ) VALUES ( 7 , 'test' , 'test' , 'String' , 'Text' ,  NULL ,  NULL ,  NULL ,  0 ,  2 ,  NULL ,  NULL ,  1 ,  NULL ,  NULL ,  255 ,  NULL ,  NULL ,  NULL ,  NULL ,  60 ,  4 , 'test' ,  NULL ,  NULL ,  0 )  [nativecode=1423 ** Field of view 'dmastercivi_g5lis.civicrm_custom_field_en_US' underlying table doesn't have a default value]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO `civicrm_custom_field_en_US` (`custom_group_id` , `name` , `label` , `data_type` , `html_type` , `default_value` , `is_required` , `is_searchable` , `is_search_range` , `weight` , `help_pre` , `help_post` , `is_active` , `is_view` , `options_per_line` , `text_length` , `start_date_years` , `end_date_years` , `date_format` , `time_format` , `note_columns` , `note_rows` , `column_name` , `option_group_id` , `filter` , `in_selector` ) VALUES ( 7 , 'test' , 'test' , 'String' , 'Text' ,  NULL ,  NULL ,  NULL ,  0 ,  2 ,  NULL ,  NULL ,  1 ,  NULL ,  NULL ,  255 ,  NULL ,  NULL ,  NULL ,  NULL ,  60 ,  4 , 'test' ,  NULL ,  NULL ,  0 )  [nativecode=1423 ** Field of view 'dmastercivi_g5lis.civicrm_custom_field_en_US' underlying table doesn't have a default value]"]

)`

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
5.27.0
Milestone
5.27.0
Assign milestone
Time tracking
None
Due date
None
Reference: dev/translation#38