Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.2
-
Fix Version/s: 4.3.3
-
Component/s: None
-
Labels:None
Description
I am getting the below error
To reproduce this take a 4.2 database & update the membership_fee for a membership captured by the query below to be equal to NULL. The column being updated does not permit null (& oddly it is a varchar not an integer field even though it represents money).
Note that I am fixing this in our DB so that the value is 0 - it should be easy to replicate this on a test DB so I am not retaining a copy for testing the fix.
[Error: Upgrade DB to 4.3.beta4: SQL]
Error Field Error Value
Type DB_Error
Code -1
Message DB Error: unknown error
Mode 16
UserInfo UPDATE civicrm_membership_type cmt LEFT JOIN civicrm_price_field_value cpfv ON cpfv.membership_type_id = cmt.id LEFT JOIN civicrm_price_field cpf ON cpf.id = cpfv.price_field_id LEFT JOIN civicrm_price_set cps ON cps.id = cpf.price_set_id SET cpfv.financial_type_id = cmt.financial_type_id, cpfv.label = cmt.name, cpfv.description = cmt.description, cpfv.amount = cmt.minimum_fee WHERE cps.is_quick_config = 1 AND cpfv.membership_type_id IS NOT NULL [nativecode=1265 ** Data truncated for column 'amount' at row 1]
DebugInfo UPDATE civicrm_membership_type cmt LEFT JOIN civicrm_price_field_value cpfv ON cpfv.membership_type_id = cmt.id LEFT JOIN civicrm_price_field cpf ON cpf.id = cpfv.price_field_id LEFT JOIN civicrm_price_set cps ON cps.id = cpf.price_set_id SET cpfv.financial_type_id = cmt.financial_type_id, cpfv.label = cmt.name, cpfv.description = cmt.description, cpfv.amount = cmt.minimum_fee WHERE cps.is_quick_config = 1 AND cpfv.membership_type_id IS NOT NULL [nativecode=1265 ** Data truncated for column 'amount' at row 1]
PEAR_Exception: DB Error: unknown error in unknown on line unknown
- DB_Error: DB Error: unknown error in unknown on line unknown
Exception trace
- Function Location
0 CRM_Core_Error::exceptionHandler(Object(DB_Error)) unknown:unknown
1 call_user_func(Array, Object(DB_Error)) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/packages/PEAR.php:931
2 PEAR_Error->PEAR_Error('DB Error: unknow…', -1, 16, Array, 'UPDATE civicrm_m…') /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/packages/DB.php:969
3 DB_Error->DB_Error(-1, 16, Array, 'UPDATE civicrm_m…') /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/packages/PEAR.php:564
4 PEAR->raiseError(null, -1, null, null, 'UPDATE civicrm_m…', 'DB_Error', true) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/packages/DB/common.php:1905
5 DB_common->raiseError(-1, null, null, null, '1265 ** Data tru…') /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/packages/DB/mysql.php:898
6 DB_mysql->mysqlRaiseError() /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/packages/DB/mysql.php:327
7 DB_mysql->simpleQuery('UPDATE civicrm_m…') /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/packages/DB/common.php:1216
8 DB_common->query('UPDATE civicrm_m…') /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Utils/File.php:284
9 CRM_Utils_File::sourceSQLFile('mysql://thearts:…', '--CRM-12151ALT…', null, true) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Upgrade/Form.php:159
10 CRM_Upgrade_Form->source('--CRM-12151ALT…', true) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Upgrade/Form.php:299
11 CRM_Upgrade_Form->processLocales('/sites/thearts/s…', '4.3.beta4') /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Upgrade/Form.php:323
12 CRM_Upgrade_Form->processSQL('4.3.beta4') /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Upgrade/Incremental/php/FourThree.php:945
13 CRM_Upgrade_Incremental_php_FourThree::task_4_3_x_runSql(Object(CRM_Queue_TaskContext), '4.3.beta4') unknown:unknown
14 call_user_func_array(Array, Array) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Queue/Task.php:79
15 CRM_Queue_Task->run(Object(CRM_Queue_TaskContext)) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Queue/Runner.php:186
16 CRM_Queue_Runner->runNext(true) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Queue/Page/AJAX.php:44
17 {closure}() /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Queue/ErrorPolicy.php:80
{main}
18 CRM_Queue_ErrorPolicy->call(Object(Closure)) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Queue/Page/AJAX.php:47
19 CRM_Queue_Page_AJAX::runNext(Array) unknown:unknown
20 call_user_func(Array, Array) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Core/Invoke.php:258
21 CRM_Core_Invoke::runItem(Array) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Core/Invoke.php:70
22 CRM_Core_Invoke::_invoke(Array) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/CRM/Core/Invoke.php:52
23 CRM_Core_Invoke::invoke(Array) /sites/thearts/sites/my.thearts.co.nz/modules/civicrm/drupal/civicrm.module:436
24 civicrm_invoke('upgrade', 'queue', 'ajax', 'runNext') unknown:unknown
25 call_user_func_array('civicrm_invoke', Array) /sites/thearts/includes/menu.inc:517
26 menu_execute_active_handler() /sites/thearts/index.php:21
27