Keyoung 3 Posted October 31, 2018 Report Share Posted October 31, 2018 I encountered below error while trying to save a newly created 'Account': Error Code: 500Error Message: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field 'modelName' doesn't have a default valueStack Trace: [click to toggle display]X2Engine Version: 7.0PHP Version: 7.0.32-3+ubuntu18.04.1+deb.sury.org+1 Please check and advise. Quote Link to post Share on other sites
X2Peter 45 Posted October 31, 2018 Report Share Posted October 31, 2018 Hello Keyoung, Could you send me the full stack trace of this error (this can be done by clicking the 'click to toggle display' link)? Quote Link to post Share on other sites
Keyoung 3 Posted November 1, 2018 Author Report Share Posted November 1, 2018 Here it is:Error Code: 500Error Message: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field 'modelName' doesn't have a default valueStack Trace: [click to toggle display]CDbException in /var/www/html/x2crm/framework/db/CDbCommand.php(358)#0 /var/www/html/x2crm/framework/db/ar/CActiveRecord.php(1083): CDbCommand->execute()#1 /var/www/html/x2crm/protected/models/X2Model.php(1607): CActiveRecord->insert(NULL)#2 /var/www/html/x2crm/protected/models/X2Model.php(901): X2Model->insert(NULL)#3 /var/www/html/x2crm/protected/modules/accounts/controllers/AccountsController.php(218): X2Model->save()#4 /var/www/html/x2crm/framework/web/actions/CInlineAction.php(49): AccountsController->actionCreate()#5 /var/www/html/x2crm/framework/web/CController.php(308): CInlineAction->runWithParams(Array)#6 /var/www/html/x2crm/framework/web/filters/CFilterChain.php(133): CController->runAction(Object(CInlineAction))#7 /var/www/html/x2crm/protected/controllers/x2base.php(579): CFilterChain->run()#8 /var/www/html/x2crm/framework/web/filters/CInlineFilter.php(58): x2base->filterSetPortlets(Object(CFilterChain))#9 /var/www/html/x2crm/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain))#10 /var/www/html/x2crm/framework/web/filters/CFilter.php(40): CFilterChain->run()#11 /var/www/html/x2crm/framework/web/filters/CFilterChain.php(130): CFilter->filter(Object(CFilterChain))#12 /var/www/html/x2crm/framework/web/filters/CFilter.php(40): CFilterChain->run()#13 /var/www/html/x2crm/framework/web/filters/CFilterChain.php(130): CFilter->filter(Object(CFilterChain))#14 /var/www/html/x2crm/framework/web/CController.php(291): CFilterChain->run()#15 /var/www/html/x2crm/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)#16 /var/www/html/x2crm/framework/web/CWebApplication.php(282): CController->run('create')#17 /var/www/html/x2crm/protected/components/X2WebApplication.php(63): CWebApplication->runController('accounts/accoun...')#18 /var/www/html/x2crm/framework/base/CApplication.php(185): X2WebApplication->processRequest()#19 /var/www/html/x2crm/index.php(65): CApplication->run()#20 {main}X2Engine Version: 7.0PHP Version: 7.0.32-3+ubuntu18.04.1+deb.sury.org+1 Quote Link to post Share on other sites
Keyoung 3 Posted November 5, 2018 Author Report Share Posted November 5, 2018 Any hints or update?This error occurs whenever I try to create an account and then save. Quote Link to post Share on other sites
page1 0 Posted November 7, 2018 Report Share Posted November 7, 2018 I am having this same exact issue... PLEASE HELP Quote Link to post Share on other sites
Keyoung 3 Posted November 8, 2018 Author Report Share Posted November 8, 2018 Yes, this is annoying as it is the basic function of the system. Now I cannot create NEW account!!!Pls help urgently!!! Quote Link to post Share on other sites
MistaJohn 1 Posted November 8, 2018 Report Share Posted November 8, 2018 A quick fix is to add the Model Name field in the Account form - add to the bottom of the form, field does not have to be populated for an Account to be created. 1 Quote Link to post Share on other sites
page1 0 Posted November 8, 2018 Report Share Posted November 8, 2018 EXCELLENT THAT WORKED!!THANK YOU!!! I'm back in business. Quote Link to post Share on other sites
X2Peter 45 Posted November 9, 2018 Report Share Posted November 9, 2018 This is strange, I am having trouble replicating this issue on a fresh installation of 7.0. Is this happening with any other modules? Quote Link to post Share on other sites
page1 0 Posted November 9, 2018 Report Share Posted November 9, 2018 I am assuming this is happening on older versions that upgrade to 7.0. I have recently upgraded and ran into this issue. It's been a while since my upgrade, but I don't think I have tried to create a new record since the upgrade took place. Quote Link to post Share on other sites
Keyoung 3 Posted November 9, 2018 Author Report Share Posted November 9, 2018 I already have 'modelName' field in x2_accounts. What I did is to change the 'Default Value' from 'NULL' to 'Empty String' and it works! Problem solved! Quote Link to post Share on other sites
dale 0 Posted March 6, 2019 Report Share Posted March 6, 2019 Started having issues saving an opportunity sometime after upgrading to 7. The same error on 'modelName' but in Opportunities. I added a default value in the field editor and that worked. All the older entries were blank in 'modelName'. Changing the default value to "null" in the database worked. I don't know if this is somewhat related or not. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.