Jump to content


Photo

Error 500 on certain tabs for new user

error 500

  • Please log in to reply
3 replies to this topic

#1 urthllc

urthllc

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 26 August 2020 - 04:30 AM

Hello,

 

I've recently installed X2crm and when I add a user I get this error on various tabs:

Error Code: 500
Error Message: CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'urtcrm_db.f.readOnly' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Stack Trace: [click to toggle display]

CDbException in /home/urthorg/public_html/urtcrm/framework/db/ar/CActiveRecord.php(145)
#0 /home/urthorg/public_html/urtcrm/framework/db/CDbCommand.php(396): CDbCommand->queryInternal('fetchAll', 3, Array)
#1 /home/urthorg/public_html/urtcrm/protected/models/X2Model.php(2755): CDbCommand->queryAll(false)
#2 /home/urthorg/public_html/urtcrm/framework/base/CComponent.php(111): X2Model->getFieldPermissions()
#3 /home/urthorg/public_html/urtcrm/framework/db/ar/CActiveRecord.php(145): CComponent->__get('fieldPermission...')
#4 /home/urthorg/public_html/urtcrm/protected/models/X2Model.php(2707): CActiveRecord->__get('fieldPermission...')
#5 /home/urthorg/public_html/urtcrm/protected/models/FormLayout.php(130): X2Model->getEditableFieldNames(false)
#6 /home/urthorg/public_html/urtcrm/protected/components/X2GridView/massActions/MassUpdateFields.php(41): FormLayout->getEditableFieldsInLayout('Contacts')
#7 /home/urthorg/public_html/urtcrm/protected/components/views/_x2GridViewMassActionButtons.php(263): MassUpdateFields->renderDialog('contacts-grid', 'Contacts')
#8 /home/urthorg/public_html/urtcrm/framework/web/CBaseController.php(126): require('/home/urthorg/p...')
#9 /home/urthorg/public_html/urtcrm/framework/web/CBaseController.php(95): CBaseController->renderInternal('/home/urthorg/p...', Array, true)
#10 /home/urthorg/public_html/urtcrm/framework/web/CController.php(872): CBaseController->renderFile('/home/urthorg/p...', Array, true)
#11 /home/urthorg/public_html/urtcrm/protected/components/X2GridView/X2GridViewBase.php(740): CController->renderPartial('application.com...', Array)
#12 /home/urthorg/public_html/urtcrm/framework/zii/widgets/CBaseListView.php(181): X2GridViewBase->renderMassActionButtons()
#13 [internal function]: CBaseListView->renderSection(Array)
#14 /home/urthorg/public_html/urtcrm/framework/zii/widgets/CBaseListView.php(164): preg_replace_callback('/{(\\w+)}/', Array, '<div id="x2-gri...')
#15 /home/urthorg/public_html/urtcrm/protected/components/X2GridView/X2GridViewBase.php(650): CBaseListView->renderContent()
#16 /home/urthorg/public_html/urtcrm/protected/controllers/x2base.php(827): X2GridViewBase->run()
#17 /home/urthorg/public_html/urtcrm/protected/modules/contacts/views/contacts/index.php(99): x2base->widget('X2GridView', Array)
#18 /home/urthorg/public_html/urtcrm/framework/web/CBaseController.php(126): require('/home/urthorg/p...')
#19 /home/urthorg/public_html/urtcrm/framework/web/CBaseController.php(95): CBaseController->renderInternal('/home/urthorg/p...', Array, true)
#20 /home/urthorg/public_html/urtcrm/framework/web/CController.php(872): CBaseController->renderFile('/home/urthorg/p...', Array, true)
#21 /home/urthorg/public_html/urtcrm/protected/controllers/x2base.php(725): CController->renderPartial('index', Array, true)
#22 /home/urthorg/public_html/urtcrm/protected/modules/contacts/controllers/ContactsController.php(1295): x2base->render('index', Array)
#23 /home/urthorg/public_html/urtcrm/framework/web/actions/CInlineAction.php(49): ContactsController->actionIndex()
#24 /home/urthorg/public_html/urtcrm/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#25 /home/urthorg/public_html/urtcrm/framework/web/filters/CFilterChain.php(134): CController->runAction(Object(CInlineAction))
#26 /home/urthorg/public_html/urtcrm/protected/controllers/x2base.php(575): CFilterChain->run()
#27 /home/urthorg/public_html/urtcrm/framework/web/filters/CInlineFilter.php(58): x2base->filterSetPortlets(Object(CFilterChain))
#28 /home/urthorg/public_html/urtcrm/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(Object(CFilterChain))
#29 /home/urthorg/public_html/urtcrm/framework/web/filters/CFilter.php(40): CFilterChain->run()
#30 /home/urthorg/public_html/urtcrm/framework/web/filters/CFilterChain.php(131): CFilter->filter(Object(CFilterChain))
#31 /home/urthorg/public_html/urtcrm/framework/web/filters/CFilter.php(40): CFilterChain->run()
#32 /home/urthorg/public_html/urtcrm/framework/web/filters/CFilterChain.php(131): CFilter->filter(Object(CFilterChain))
#33 /home/urthorg/public_html/urtcrm/framework/web/CController.php(291): CFilterChain->run()
#34 /home/urthorg/public_html/urtcrm/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#35 /home/urthorg/public_html/urtcrm/framework/web/CWebApplication.php(282): CController->run('index')
#36 /home/urthorg/public_html/urtcrm/protected/components/X2WebApplication.php(55): CWebApplication->runController('contacts/contac...')
#37 /home/urthorg/public_html/urtcrm/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#38 /home/urthorg/public_html/urtcrm/index.php(57): CApplication->run()
#39 {main}

X2Engine Version: 8.0
PHP Version: 7.2.24-0ubuntu0.18.04.6

 

I have tried to reinstall the crm several times, cleared cache between each time and dropped the database and started fresh each time. I've tried with no sample data and with sample data with the same results. 

Tabs that are affected = 

Activity feed = No issues

Contacts = Error 500

Accounts= Error 500

Marketing = Error 500

Leads = Error 500

Opportunities = Error 500

Service = Error 500

Actions = No issues

Calendar = No issues

Topics = Error 500

Email = No issues

Docs = No issues

Process = No issues

Media = Error 500

Groups = No issues

 

 

Thanks,

 

Tony

 



#2 jack

jack

    Admin

  • Administrators
  • 61 posts

Posted 26 August 2020 - 09:38 AM

Hi Urthllc,
Is this happening for all users or just the new user?

-Jack 



#3 alt_f4

alt_f4

    Advanced Member

  • Premium Members
  • PipPipPip
  • 387 posts
  • LocationGermany

Posted 28 August 2020 - 02:32 AM

"Error Message:....which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"

Did you try to remove ONLY_FULL_GROUP_BY from mysql console (make a backup first!)?

SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));


#4 therealsai

therealsai

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 11 October 2020 - 10:02 AM

Another solution to this problem if it helps anyone:

 

Add the following to the file here (/app/data/public/protected/config/main.php) around line 260.

 

'initSQLs'=>array("SET @@sql_mode = REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY,', '')",),

 

see screenshot attached. Screen Shot 2020-10-11 at 10.58.01 AM.png

 

P.S. don't forget to include the comma in the previous line. 







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users