Error An Internal Error Has Occurred. Record not found in table "roles"

440 views
Skip to first unread message

Soai Vu

unread,
Jan 26, 2017, 2:13:30 PM1/26/17
to QuickApps CMS
Hi,
I installed Quickapps - cms.
After login with admin -> " Error An Internal Error Has Occurred.  Record not found in table "roles""
Please help me, thanks !

Log: 
2017-01-26 18:38:35 Error: [Cake\Datasource\Exception\RecordNotFoundException] Record not found in table "roles"
Request URL: /demo/en_US/admin
Client IP: 
Stack Trace:
#0 localhost/demo/vendor/cakephp/cakephp/src/ORM/Table.php(1225): Cake\ORM\Query->firstOrFail()
#1 localhost/demo/vendor/quickapps-plugins/user/config/bootstrap.php(97): Cake\ORM\Table->get(2, Array)
#2 localhost/demo/vendor/quickapps-plugins/system/config/bootstrap.php(111): user()
#3 [internal function]: Cake\Core\Plugin::{closure}(Object(Cake\Network\Request))
#4 localhost/demo/vendor/cakephp/cakephp/src/Network/Request.php(683): call_user_func_array(Object(Closure), Array)
#5 localhost/demo/vendor/cakephp/cakephp/src/Network/Request.php(653): Cake\Network\Request->_is('useradmin', Array)
#6 localhost/demo/vendor/quickapps-plugins/user/src/Auth/CachedAuthorize.php(41): Cake\Network\Request->is('userAdmin')
#7 localhost/demo/vendor/cakephp/cakephp/src/Controller/Component/AuthComponent.php(504): User\Auth\CachedAuthorize->authorize(Array, Object(Cake\Network\Request))
#8 localhost/demo/vendor/cakephp/cakephp/src/Controller/Component/AuthComponent.php(309): Cake\Controller\Component\AuthComponent->isAuthorized(Array)
#9 localhost/demo/vendor/cakephp/cakephp/src/Controller/Component/AuthComponent.php(260): Cake\Controller\Component\AuthComponent->authCheck(Object(Cake\Event\Event))
#10 localhost/demo/vendor/cakephp/cakephp/src/Event/EventManager.php(422): Cake\Controller\Component\AuthComponent->startup(Object(Cake\Event\Event))
#11 localhost/demo/vendor/cakephp/cakephp/src/Event/EventManager.php(391): Cake\Event\EventManager->_callListener(Array, Object(Cake\Event\Event))
#12 localhost/demo/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php(78): Cake\Event\EventManager->dispatch(Object(Cake\Event\Event))
#13 localhost/demo/vendor/cakephp/cakephp/src/Controller/Controller.php(501): Cake\Controller\Controller->dispatchEvent('Controller.star...')
#14 localhost/demo/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(116): Cake\Controller\Controller->startupProcess()
#15 localhost/demo/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(95): Cake\Http\ActionDispatcher->_invoke(Object(System\Controller\Admin\DashboardController))
#16 localhost/demo/vendor/cakephp/cakephp/src/Routing/Dispatcher.php(60): Cake\Http\ActionDispatcher->dispatch(Object(Cake\Network\Request), Object(Cake\Network\Response))
#17 localhost/demo/webroot/index.php(37): Cake\Routing\Dispatcher->dispatch(Object(Cake\Network\Request), Object(Cake\

Chris

unread,
Jan 26, 2017, 2:26:26 PM1/26/17
to QuickApps CMS
Hi,

Seems like your database is not being correctly populated during installation.
Which database engine are you using? (Check its logs is possible, and see if something happened during installation)
Check your table `roles`, after installation it should have 3 entries:

Soai Vu

unread,
Feb 1, 2017, 8:46:54 AM2/1/17
to QuickApps CMS
Hi,
Thanks for reply

I have reinstalled as follows:
Step 1: install CentOS 6.5
Step 3: install quickapp-cms composer -s dev quickapps create-project / website [WEBSITE_NAME]

After installation is complete, I login -> Done. Then in the left menu of the administrator select one any feature -> Error.
I checked have table roles + enough data on database

Soai Vu

unread,
Feb 1, 2017, 8:56:31 AM2/1/17
to QuickApps CMS
P.s: If I deleted all tmp/* & cookies -> Login Done. After choose any feature -> error.

Chris

unread,
Feb 1, 2017, 5:01:22 PM2/1/17
to QuickApps CMS
So after re-install you can now login but a new error ocurrs?
Could you please provide your errors.log trace ? So we can determinate if it's a complete new error or is related to the first one you mentioned. 

However I still suspect it may be related to an incorrect DB population during installation. Try this: after installation use the MySQL dump file
https://github.com/quickapps/cms/tree/2.0/plugins/Installer/config to populate your database, clear caches, and try again. (Follow the README instructions)

Paul West

unread,
Mar 6, 2017, 4:18:45 AM3/6/17
to QuickApps CMS

I had this issue, if you are on the latest version of cake and check you PHP version I had to move off 7.0.13  to 7.0.15 once I upgraded cake:  - 
Removing cakephp/cakephp (3.3.12)
  - Installing cakephp/cakephp (3.4.2)
    Downloading: 100%

7.0.13 seems buggy.

Paul
Reply all
Reply to author
Forward
0 new messages