Missing Database Table
Error:
Table users for model User was not found in datasource default.
Notice:
If you want to customize this error message, create app/View/Errors/missing_table.ctp
Stack Trace
- CORE/Cake/Model/Model.php line 3380 → Model->setSource(string)
public function getDataSource() {
if (!$this->_sourceConfigured && $this->useTable !== false) {
$this->_sourceConfigured = true;
$this->setSource($this->useTable);
}
- CORE/Cake/Model/Datasource/DboSource.php line 1043 → Model->getDataSource()
$linkModel = $model->{$assoc};
$external = isset($assocData['external']);
$linkModel->getDataSource();
if ($model->useDbConfig === $linkModel->useDbConfig) {
- CORE/Cake/Model/Model.php line 2635 → DboSource->read(Comment, array)
return null;
}
$results = $this->getDataSource()->read($this, $query);
$this->resetAssociations();
object(Comment) {
hasMany => array(
)
belongsTo => array(
)
validate => array(
)
useDbConfig => 'default'
useTable => 'comments'
id => false
data => array()
schemaName => 'ppcc'
table => 'comments'
primaryKey => 'id'
validationErrors => array()
validationDomain => null
tablePrefix => ''
name => 'Comment'
alias => 'Comment'
tableToModel => array(
)
cacheQueries => false
hasOne => array()
hasAndBelongsToMany => array()
actsAs => null
Behaviors => object(BehaviorCollection) {}
whitelist => array()
cacheSources => true
findQueryType => 'all'
recursive => (int) 0
order => null
virtualFields => array()
__backAssociation => array()
__backInnerAssociation => array()
__backOriginalAssociation => array()
__backContainableAssociation => array()
findMethods => array(
)
Card => object(Card) {}
User => object(User) {}
}
array(
'conditions' => array(
),
'fields' => null,
'joins' => array(),
'limit' => (int) 100,
'offset' => null,
'order' => array(
),
'page' => (int) 1,
'group' => null,
'callbacks' => true,
'maxLimit' => (int) 100,
'paramType' => 'named'
)
- CORE/Cake/Controller/Component/PaginatorComponent.php line 172 → Model->find(string, array)
if ($recursive != $object->recursive) {
$parameters['recursive'] = $recursive;
}
$results = $object->find($type, array_merge($parameters, $extra));
}
'all'
array(
'conditions' => array(
),
'fields' => null,
'order' => array(
),
'limit' => (int) 100,
'page' => (int) 1,
'maxLimit' => (int) 100,
'paramType' => 'named'
)
- CORE/Cake/Controller/Controller.php line 1087 → PaginatorComponent->paginate(array, array, array)
* @deprecated Use PaginatorComponent instead
*/
public function paginate($object = null, $scope = array(), $whitelist = array()) {
return $this->Components->load('Paginator', $this->paginate)->paginate($object, $scope, $whitelist);
}
array(
'Comment.country_id' => '1',
'Comment.type' => 'news'
)
array()
array()
- APP/Controller/CommentsController.php line 31 → Controller->paginate(array)
public function index_news() {
$this->Comment->recursive = 0;
$news = $this->paginate(array('Comment.country_id' => Configure::read('country_id'), 'Comment.type' => 'news'));
//check if request from latest news element
array(
'Comment.country_id' => '1',
'Comment.type' => 'news'
)
- [internal function] → CommentsController->index_news()
- CORE/Cake/Controller/Controller.php line 488 → ReflectionMethod->invokeArgs(CommentsController, array)
'action' => $request->params['action']
));
}
return $method->invokeArgs($this, $request->params['pass']);
object(CommentsController) {
paginate => array(
)
components => array(
)
name => 'Comments'
uses => array(
)
helpers => array(
)
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Comments'
layoutPath => null
viewVars => array(
)
view => 'index_news'
layout => 'default'
autoRender => true
autoLayout => true
Components => object(ComponentCollection) {}
viewClass => 'View'
View => null
ext => '.ctp'
plugin => null
cacheAction => false
passedArgs => array()
scaffold => false
methods => array(
)
modelClass => 'Comment'
modelKey => 'comment'
validationErrors => null
Session => object(SessionComponent) {}
Auth => object(AuthComponent) {}
Country => object(Country) {}
Comment => object(Comment) {}
}
array()
- CORE/Cake/Routing/Dispatcher.php line 103 → Controller->invokeAction(CakeRequest)
$controller->startupProcess();
$render = true;
$result = $controller->invokeAction($request);
if ($result instanceof CakeResponse) {
object(CakeRequest) {
params => array(
)
data => array()
query => array()
url => 'comments/index_news'
base => ''
webroot => '/'
here => '/comments/index_news'
}
- CORE/Cake/Routing/Dispatcher.php line 85 → Dispatcher->_invoke(CommentsController, CakeRequest, CakeResponse)
));
}
return $this->_invoke($controller, $request, $response);
}
object(CommentsController) {
paginate => array(
)
components => array(
)
name => 'Comments'
uses => array(
)
helpers => array(
)
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Comments'
layoutPath => null
viewVars => array(
)
view => 'index_news'
layout => 'default'
autoRender => true
autoLayout => true
Components => object(ComponentCollection) {}
viewClass => 'View'
View => null
ext => '.ctp'
plugin => null
cacheAction => false
passedArgs => array()
scaffold => false
methods => array(
)
modelClass => 'Comment'
modelKey => 'comment'
validationErrors => null
Session => object(SessionComponent) {}
Auth => object(AuthComponent) {}
Country => object(Country) {}
Comment => object(Comment) {}
}
object(CakeRequest) {
params => array(
)
data => array()
query => array()
url => 'comments/index_news'
base => ''
webroot => '/'
here => '/comments/index_news'
}
object(CakeResponse) {
}
- APP/webroot/index.php line 96 → Dispatcher->dispatch(CakeRequest, CakeResponse)
App::uses('Dispatcher', 'Routing');
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch(new CakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding'))));
object(CakeRequest) {
params => array(
)
data => array()
query => array()
url => 'comments/index_news'
base => ''
webroot => '/'
here => '/comments/index_news'
}
object(CakeResponse) {
}