2

I've generated a new report in my extension, but when I try to register it with CiviReport, I'm getting the following DB error: Database Error Code: Field of view 'sporti62_wp4.civicrm_option_value_en_CA' 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_option_value_en_CA (option_group_id , label , value , name , filter , is_default , weight , description , is_optgroup , is_active , component_id ) VALUES ( 41 , 'Dog Registry with Contacts' , 'dogregistry/contacts' , 'CRM_Dogregistry_Form_Report_Dog_Contact_Summary' ,  0 ,  0 ,  90 , 'Dog Registry with Contacts' ,  0 ,  1 ,  NULL )  [nativecode=1423 ** Field of view 'sporti62_wp4.civicrm_option_value_en_CA' underlying table doesn't have a default value]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_option_value_en_CA (option_group_id , label , value , name , filter , is_default , weight , description , is_optgroup , is_active , component_id ) VALUES ( 41 , 'Dog Registry with Contacts' , 'dogregistry/contacts' , 'CRM_Dogregistry_Form_Report_Dog_Contact_Summary' ,  0 ,  0 ,  90 , 'Dog Registry with Contacts' ,  0 ,  1 ,  NULL )  [nativecode=1423 ** Field of view 'sporti62_wp4.civicrm_option_value_en_CA' 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_option_value_en_CA (option_group_id , label , value , name , filter , is_default , weight , description , is_optgroup , is_active , component_id ) VALUES ( 41 , 'Dog Registry with Contacts' , 'dogregistry/contacts' , 'CRM_Dogregistry_Form_Report_Dog_Contact_Summary' ,  0 ,  0 ,  90 , 'Dog Registry with Contacts' ,  0 ,  1 ,  NULL )  [nativecode=1423 ** Field of view 'sporti62_wp4.civicrm_option_value_en_CA' underlying table doesn't have a default value]"]

)

I know it is likely related wp_globus plugin? I do have two languages on my site - english and french.

1

Ok, again solved my own problem after doing more research. This apparently is a known issue with mySql and MariaDB where strict mode seems to be default. Adding sql_mode="" to your /etc/my.cnf file will resolve the issue.

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.