Giray Posted June 6, 2022 Posted June 6, 2022 Trying to both edit a current Stock Action and/or try to create a new one and I get an error. Any ideas? Thanks UPDATE `nexus_support_stock_actions` `nexus_support_stock_actions` SET `action_status`=2,`action_staff`=NULL,`action_message`='<p> We have escalated your request to K3MRI. The ticket will be placed on a short hold pending his reply. </p> <p> Thank you. </p> ',`action_show_in`='*' WHERE action_id=2 IPS\Db\Exception: Column 'action_staff' cannot be null (1048) #0 /home/myaccount/public_html/system/Db/Db.php(1156): IPS\_Db->preparedQuery('/*myaccount_ipsma...', Array) #1 /home/myaccount/public_html/system/Patterns/ActiveRecord.php(520): IPS\_Db->update('`nexus_support_...', '`action_status`...', 'WHERE action_id...') #2 /home/myaccount/public_html/system/Node/Model.php(2494): IPS\Patterns\_ActiveRecord->save() #3 /home/myaccount/public_html/init.php(913) : eval()'d code(257): IPS\Node\_Model->save() #4 /home/myaccount/public_html/system/Node/Model.php(3316): IPS\Node\radtags_hook_C_NodeModel->save() #5 /home/myaccount/public_html/init.php(913) : eval()'d code(184): IPS\Node\_Model->saveForm(Array) #6 /home/myaccount/public_html/system/Node/Controller.php(419): IPS\Node\radtags_hook_C_NodeModel->saveForm(Array) #7 /home/myaccount/public_html/system/Dispatcher/Controller.php(90): IPS\Node\_Controller->form() #8 /home/myaccount/public_html/system/Node/Controller.php(69): IPS\Dispatcher\_Controller->execute() #9 /home/myaccount/public_html/applications/nexus/modules/admin/support/stockactions.php(39): IPS\Node\_Controller->execute() #10 /home/myaccount/public_html/applications/nexus/modules/admin/support/settings.php(91): IPS\nexus\modules\admin\support\_stockactions->execute() #11 /home/myaccount/public_html/system/Dispatcher/Controller.php(90): IPS\nexus\modules\admin\support\_settings->__call('form', Array) #12 /home/myaccount/public_html/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute() #13 /home/myaccount/public_html/admin/index.php(13): IPS\_Dispatcher->run() #14 {main} And this is the Backtrace: #0 /home/myaccount/public_html/init.php(1015): IPS\_Log::log('UPDATE `nexus_s...', 'uncaught_except...') #1 [internal function]: IPS\IPS::exceptionHandler(Object(IPS\Db\Exception)) #2 {main} I'm going to explore if it has to do with Radical Tags. Seems to be mentioned in the system log. Nope, that's not it. Even with Radtags deactivated it crashes.
Sonya* Posted June 6, 2022 Posted June 6, 2022 Try to disable Radical Tags. If the issue is gone, then contact the developer. Giray 1
Giray Posted June 7, 2022 Author Posted June 7, 2022 Thanks @Sonya*. I tried but that was not it. Still crashing 😞
Sonya* Posted June 7, 2022 Posted June 7, 2022 11 minutes ago, Giray said: Thanks @Sonya*. I tried but that was not it. Still crashing 😞 Do your logs still contain those lines after disabling radical tags? #4 /home/myaccount/public_html/system/Node/Model.php(3316): IPS\Node\radtags_hook_C_NodeModel->save() Can you post here a crash log when Radical Tag is disabled?
Giray Posted June 7, 2022 Author Posted June 7, 2022 24 minutes ago, Sonya* said: Do your logs still contain those lines after disabling radical tags? #4 /home/myaccount/public_html/system/Node/Model.php(3316): IPS\Node\radtags_hook_C_NodeModel->save() Can you post here a crash log when Radical Tag is disabled? Hi again (thx for the help!) Still crashing with Radtags disabled. Here is the log though radtags has disappeared, the 3316 remains. UPDATE `nexus_support_stock_actions` `nexus_support_stock_actions` SET `action_status`=2,`action_staff`=NULL,`action_message`='<p> This ticket is being escalated to Jim | K3MRI for action. Please allow him time to review and respond. Thank you. </p> ',`action_show_in`='*' WHERE action_id=3 IPS\Db\Exception: Column 'action_staff' cannot be null (1048) #0 /home/myaccount/public_html/system/Db/Db.php(1156): IPS\_Db->preparedQuery('/*myaccount_ipsma...', Array) #1 /home/myaccount/public_html/system/Patterns/ActiveRecord.php(520): IPS\_Db->update('`nexus_support_...', '`action_status`...', 'WHERE action_id...') #2 /home/myaccount/public_html/system/Node/Model.php(2494): IPS\Patterns\_ActiveRecord->save() #3 /home/myaccount/public_html/system/Node/Model.php(3316): IPS\Node\_Model->save() #4 /home/myaccount/public_html/system/Node/Controller.php(419): IPS\Node\_Model->saveForm(Array) #5 /home/myaccount/public_html/system/Dispatcher/Controller.php(90): IPS\Node\_Controller->form() #6 /home/myaccount/public_html/system/Node/Controller.php(69): IPS\Dispatcher\_Controller->execute() #7 /home/myaccount/public_html/applications/nexus/modules/admin/support/stockactions.php(39): IPS\Node\_Controller->execute() #8 /home/myaccount/public_html/applications/nexus/modules/admin/support/settings.php(91): IPS\nexus\modules\admin\support\_stockactions->execute() #9 /home/myaccount/public_html/system/Dispatcher/Controller.php(90): IPS\nexus\modules\admin\support\_settings->__call('form', Array) #10 /home/myaccount/public_html/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute() #11 /home/myaccount/public_html/admin/index.php(13): IPS\_Dispatcher->run() #12 {main} And the backtrace: #0 /home/myaccount/public_html/init.php(1015): IPS\_Log::log('UPDATE `nexus_s...', 'uncaught_except...') #1 [internal function]: IPS\IPS::exceptionHandler(Object(IPS\Db\Exception)) #2 {main}
Nathan Explosion Posted June 7, 2022 Posted June 7, 2022 If you've ruled out 3rd party, post the issue here and get IPS support: https://invisioncommunity.com/forums/forum/497-help-support/ Sonya*, Giray and SeNioR- 2 1
Sonya* Posted June 7, 2022 Posted June 7, 2022 Yes, it is most likely an IPS bug. I see in the source code that they set the field to NULL if not filled. The database does not accept NULL values though. if( isset( $values['action_staff'] ) ) { $values['action_staff'] = $values['action_staff'] ? \IPS\Member::load( $values['action_staff'] ) : NULL; } Giray, SeNioR- and Adriano Faria 2 1
Daniel F Posted June 7, 2022 Posted June 7, 2022 The action_staff column is a BIGINT with 0 as default?! "action_staff": { "allow_null": false, "auto_increment": false, "binary": false, "comment": "", "decimals": null, "default": "0", "length": 20, "name": "action_staff", "type": "BIGINT", "unsigned": true, "values": [], "zerofill": false }, That said, @Giray I'm not able to login into your ACP. Please review the login credentials we have on file so that we can take a look at this.
Sonya* Posted June 7, 2022 Posted June 7, 2022 2 minutes ago, Daniel F said: Why would it not be allowed to be null? Because his database says it explicitly: IPS\Db\Exception: Column 'action_staff' cannot be null (1048)
Sonya* Posted June 7, 2022 Posted June 7, 2022 5 minutes ago, Daniel F said: "allow_null": false, Does it mean literally: no NULL values, please? Should the code be changed to 0 instead of NULL? if( isset( $values['action_staff'] ) ) { $values['action_staff'] = $values['action_staff'] ? \IPS\Member::load( $values['action_staff'] ) : 0; } Note: I cannot reproduce the error on my fresh 4.7.0 Beta 5 install. Probably some changes have been made to departments, staff members or whatever, that causes it.
Giray Posted June 7, 2022 Author Posted June 7, 2022 22 minutes ago, Daniel F said: That said, @Giray I'm not able to login into your ACP. Please review the login credentials we have on file so that we can take a look at this. Sorry about that @Daniel F. Done, fixed. You should now have access (I hope).
Daniel F Posted June 7, 2022 Posted June 7, 2022 1 hour ago, Sonya* said: Does it mean literally: no NULL values, please? Should the code be changed to 0 instead of NULL? if( isset( $values['action_staff'] ) ) { $values['action_staff'] = $values['action_staff'] ? \IPS\Member::load( $values['action_staff'] ) : 0; } Note: I cannot reproduce the error on my fresh 4.7.0 Beta 5 install. Probably some changes have been made to departments, staff members or whatever, that causes it. There's also a setter which will literally set it to 0 if there's no member. /** * Set staff * * @param \IPS\Member|NULL $member The staff member to assign to * @return void */ public function set_staff( \IPS\Member $member = NULL ) { $this->_data['staff'] = $member ? $member->member_id : 0; } Sonya* 1
Giray Posted June 7, 2022 Author Posted June 7, 2022 @Daniel F Have to leave for the day. I'll check back to see if you managed to fix this one too. Just checked and for me, when I assign the ticket to someone, it still crashes. Have a great day.
Giray Posted June 7, 2022 Author Posted June 7, 2022 @Daniel F What's the best way forward on this bug? Thanks!!
Daniel F Posted June 8, 2022 Posted June 8, 2022 Still looking at it, but we could narrow it down to happen only with MariaDB.
Recommended Posts