Jump to content


Photo

Constant Error 500


  • Please log in to reply
12 replies to this topic

#1 eugeneb

eugeneb

    Advanced Member

  • Members
  • PipPipPip
  • 349 posts
  • LocationCenturion, south Africa

Posted 09 May 2019 - 11:47 PM

Hi guys,

 

I am constantly getting this error when loggin in:

 

Error Code: 500
Error Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'elm9195d06e0vuqsliq8trpbs7' for key 'PRIMARY'
Stack Trace: [click to toggle display]
X2Engine Version: 7.1
PHP Version: 5.6.25

 

Anyone else have it. or maybe a existing solution. I searched but couldn't find anything.



#2 jack

jack

    Admin

  • Administrators
  • 31 posts

Posted 10 May 2019 - 03:41 PM

Can you upload the rest of the stack trace?

Also that seems like a x2_sessions issue, I would delete the records on "x2_sessions" table and the "x2_sessions_token" table. And clear your X2 cookies for good measure. 



#3 eugeneb

eugeneb

    Advanced Member

  • Members
  • PipPipPip
  • 349 posts
  • LocationCenturion, south Africa

Posted 17 May 2019 - 01:17 AM

Hi Jack, 

 

I will upload the stack trace when it happens again. Doesn't always do. While I await another incident, can it be due to me logging into various X2 instances on one machine?



#4 emmalone

emmalone

    Member

  • Members
  • PipPip
  • 10 posts

Posted 17 December 2019 - 05:42 PM

Hello,  I get a similar issue when creating or editing a template email.  Any help would be appreciated.

 

Error Code: 500
Error Message: CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'x2engine.x2_info_docs' doesn't exist
Stack Trace: [click to toggle display]

CDbException in /var/www/html/x2engine/framework/db/CDbCommand.php(543)
#0 /var/www/html/x2engine/framework/db/CDbCommand.php(396): CDbCommand->queryInternal('fetchAll', Array, Array)
#1 /var/www/html/x2engine/protected/modules/docs/models/Docs.php(118): CDbCommand->queryAll()
#2 /var/www/html/x2engine/protected/modules/docs/models/Docs.php(109): Docs->infoDocCheck()
#3 /var/www/html/x2engine/framework/db/ar/CActiveRecord.php(1132): Docs->afterSave()
#4 /var/www/html/x2engine/protected/models/X2Model.php(904): CActiveRecord->update(NULL)
#5 /var/www/html/x2engine/protected/modules/docs/controllers/DocsController.php(369): X2Model->save()
#6 [internal function]: DocsController->actionUpdate('63')
#7 /var/www/html/x2engine/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(Object(DocsController), Array)
#8 /var/www/html/x2engine/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(Object(DocsController), Object(ReflectionMethod), Array)
#9 /var/www/html/x2engine/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#10 /var/www/html/x2engine/framework/web/filters/CFilterChain.php(134): CController->runAction(Object(CInlineAction))
#11 /var/www/html/x2engine/protected/controllers/x2base.php(586): CFilterChain->run()
#12 /var/www/html/x2engine/framework/web/filters/CInlineFilter.php(58): x2base->filterSetPortlets(Object(CFilterChain))
#13 /var/www/html/x2engine/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(Object(CFilterChain))
#14 /var/www/html/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run()
#15 /var/www/html/x2engine/framework/web/filters/CFilterChain.php(131): CFilter->filter(Object(CFilterChain))
#16 /var/www/html/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run()
#17 /var/www/html/x2engine/framework/web/filters/CFilterChain.php(131): CFilter->filter(Object(CFilterChain))
#18 /var/www/html/x2engine/framework/web/CController.php(291): CFilterChain->run()
#19 /var/www/html/x2engine/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#20 /var/www/html/x2engine/framework/web/CWebApplication.php(282): CController->run('update')
#21 /var/www/html/x2engine/protected/components/X2WebApplication.php(65): CWebApplication->runController('docs/docs/updat...')
#22 /var/www/html/x2engine/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#23 /var/www/html/x2engine/index.php(67): CApplication->run()
#24 {main}

X2Engine Version: 8.0
PHP Version: 5.6.40



#5 X2Clifton

X2Clifton

    Advanced Member

  • Moderators
  • 49 posts

Posted 18 December 2019 - 09:43 AM

Hi emmalone,

 

Can you go to your /docs/models/Docs.php line 109 and comment out:

$this->infoDocCheck();

and tell me if this fixes your issue?



#6 emmalone

emmalone

    Member

  • Members
  • PipPip
  • 10 posts

Posted 06 January 2020 - 08:07 AM

Hello X2Clifton,

 

Sorry for the slow reply.  I had forgotten about this particular issue until it just happened again and in searching the forum landed on my own question.  I just went to /x2engine/protected/modules/docs/models and that line does not exist in the Docs.php file.

 

Any other suggestions would be appreciated.

 

Thanks,

 

Mark



#7 X2Clifton

X2Clifton

    Advanced Member

  • Moderators
  • 49 posts

Posted 06 January 2020 - 09:18 AM

Hi emmalone,

 

Would you be able to tell me what is on line 109 of the Docs model? From your stack trace #3, it seems it's trying to call a function that shouldn't be called. Does the line I said to comment out not exist in the file at all?



#8 emmalone

emmalone

    Member

  • Members
  • PipPip
  • 10 posts

Posted 06 January 2020 - 02:19 PM

Clifton,

 

My apologies, I was in the wrong directory (old staging version of X2CRM) looking at the Docs.php.  When I got to the right place, that line is there and once commented out, now the system acts as expected, no error.

 

Thank you for your help.

 

Mark



#9 eugeneb

eugeneb

    Advanced Member

  • Members
  • PipPipPip
  • 349 posts
  • LocationCenturion, south Africa

Posted 07 January 2020 - 06:08 AM

Hi Clifton,

 

my bug on this originates from just logging into X2 and the dashboard then gives the error so I am not sure if its the same solution as Marks. His error was specific to the Doc module which you could help with.

 

Here is my topic (at the top of this thread) http://community.x2c...or-500/?p=15676

 

Any chance you have a solution for mine?

 

Thanks



#10 X2Clifton

X2Clifton

    Advanced Member

  • Moderators
  • 49 posts

Posted 07 January 2020 - 09:29 AM

Hi eugeneb,

 

I will take a look! Have you been able to recreate it and obtain a stack trace from this error? Also, are you still running version 7.1?



#11 emmalone

emmalone

    Member

  • Members
  • PipPip
  • 10 posts

Posted 17 January 2020 - 10:16 AM

Hello,
 
I apologize if I confused this issue, because I agree it looks like my issue was different than Eugene's.  But now I believe that I am having the same issue.  I cleared the sessions and sessions_token tables and I am still getting the error.  Here is the trace.
 
 
Error Code: 500
Error Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'jepu7auus6grfbk09il6aq6rd7' for key 'PRIMARY'
Stack Trace:  [click to toggle display]
 
CDbException in /var/www/html/X2CRM-master/x2engine/framework/db/CDbCommand.php(358)
 #0 /var/www/html/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(1083): CDbCommand->execute()
 #1 /var/www/html/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(811): CActiveRecord->insert(NULL)
 #2 /var/www/html/X2CRM-master/x2engine/protected/components/behaviors/CommonSiteControllerBehavior.php(232): CActiveRecord->save()
 #3 [internal function]: CommonSiteControllerBehavior->login(Object(LoginForm))
 #4 /var/www/html/X2CRM-master/x2engine/framework/base/CComponent.php(261): call_user_func_array(Array, Array)
 #5 /var/www/html/X2CRM-master/x2engine/protected/controllers/SiteController.php(1656): CComponent->__call('login', Array)
 #6 /var/www/html/X2CRM-master/x2engine/protected/controllers/SiteController.php(1656): SiteController->login(Object(LoginForm))
 #7 /var/www/html/X2CRM-master/x2engine/framework/web/actions/CInlineAction.php(49): SiteController->actionLogin()
 #8 /var/www/html/X2CRM-master/x2engine/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
 #9 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(134): CController->runAction(Object(CInlineAction))
 #10 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run()
 #11 /var/www/html/X2CRM-master/x2engine/framework/web/CController.php(1148): CFilter->filter(Object(CFilterChain))
 #12 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain))
 #13 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(Object(CFilterChain))
 #14 /var/www/html/X2CRM-master/x2engine/protected/controllers/x2base.php(586): CFilterChain->run()
 #15 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CInlineFilter.php(58): x2base->filterSetPortlets(Object(CFilterChain))
 #16 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(Object(CFilterChain))
 #17 /var/www/html/X2CRM-master/x2engine/protected/controllers/x2base.php(586): CFilterChain->run()
 #18 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CInlineFilter.php(58): x2base->filterSetPortlets(Object(CFilterChain))
 #19 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(Object(CFilterChain))
 #20 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run()
 #21 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CFilter->filter(Object(CFilterChain))
 #22 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run()
 #23 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CFilter->filter(Object(CFilterChain))
 #24 /var/www/html/X2CRM-master/x2engine/framework/web/CController.php(291): CFilterChain->run()
 #25 /var/www/html/X2CRM-master/x2engine/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
 #26 /var/www/html/X2CRM-master/x2engine/framework/web/CWebApplication.php(282): CController->run('login')
 #27 /var/www/html/X2CRM-master/x2engine/protected/components/X2WebApplication.php(66): CWebApplication->runController('site/login')
 #28 /var/www/html/X2CRM-master/x2engine/framework/base/CApplication.php(185): X2WebApplication->processRequest()
 #29 /var/www/html/X2CRM-master/x2engine/index.php(68): CApplication->run()
 #30 {main}
X2Engine Version:  8.0
PHP Version:  5.6.40
 
Thanks,
 
Mark


#12 X2Clifton

X2Clifton

    Advanced Member

  • Moderators
  • 49 posts

Posted 17 January 2020 - 10:55 AM

Hi emmalone,

 

Would you also be able to clear the x2_session_log on top of the other two and check if that resolves the problem?



#13 emmalone

emmalone

    Member

  • Members
  • PipPip
  • 10 posts

Posted 17 January 2020 - 11:47 AM

Clifton,

 

I just cleared that table.  I logged in with no error.  I will let you know if it happens again.  This has been an intermittent issue.

 

Thanks,

 

Mark






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users