Error: Table categories for model Category was not found in datasource default.
Notice: If you want to customize this error message, create app/View/Errors/missing_table.ctp
public function getDataSource() {
if (!$this->_sourceConfigured && $this->useTable !== false) {
$this->_sourceConfigured = true;
$this->setSource($this->useTable);
}
'categories'
$linkModel = $model->{$assoc};
$external = isset($assocData['external']);
$linkModel->getDataSource();
if ($model->useDbConfig === $linkModel->useDbConfig) {
return null;
}
$results = $this->getDataSource()->read($this, $query);
$this->resetAssociations();
object(News) { belongsTo => array( [maximum depth reached] ) hasMany => array( [maximum depth reached] ) recursive => (int) 2 useDbConfig => 'default' useTable => 'news' id => false data => array([maximum depth reached]) schemaName => 'loksewanepal_dev_test' table => 'news' primaryKey => 'id' validate => array([maximum depth reached]) validationErrors => array([maximum depth reached]) validationDomain => null tablePrefix => '' plugin => null name => 'News' alias => 'News' tableToModel => array( [maximum depth reached] ) cacheQueries => false hasOne => array([maximum depth reached]) hasAndBelongsToMany => array([maximum depth reached]) actsAs => null Behaviors => object(BehaviorCollection) {} whitelist => array([maximum depth reached]) cacheSources => true findQueryType => 'first' order => null virtualFields => array([maximum depth reached]) __backAssociation => array([maximum depth reached]) __backInnerAssociation => array([maximum depth reached]) __backOriginalAssociation => array([maximum depth reached]) __backContainableAssociation => array([maximum depth reached]) findMethods => array( [maximum depth reached] ) Company => object(Company) {} Category => object(Category) {} [protected] _schema => array( [maximum depth reached] ) [protected] _associationKeys => array( [maximum depth reached] ) [protected] _associations => array( [maximum depth reached] ) [protected] _insertID => null [protected] _sourceConfigured => true [protected] _eventManager => object(CakeEventManager) {} [protected] _validator => null } array( 'conditions' => array( 'News.id' => (int) 581 ), 'fields' => null, 'joins' => array(), 'limit' => (int) 1, 'offset' => null, 'order' => array( (int) 0 => null ), 'page' => (int) 1, 'group' => null, 'callbacks' => true, 'recursive' => null )
if (isset($params[3 + $off])) {
$recursive = $params[3 + $off];
}
return $args[2]->find('first', compact('conditions', 'fields', 'order', 'recursive'));
}
'first' array( 'conditions' => array( 'News.id' => (int) 581 ), 'fields' => null, 'order' => null, 'recursive' => null )
if ($result !== array('unhandled')) {
return $result;
}
$return = $this->getDataSource()->query($method, $params, $this);
return $return;
'findById' array( (int) 0 => (int) 581 ) object(News) { belongsTo => array( [maximum depth reached] ) hasMany => array( [maximum depth reached] ) recursive => (int) 2 useDbConfig => 'default' useTable => 'news' id => false data => array([maximum depth reached]) schemaName => 'loksewanepal_dev_test' table => 'news' primaryKey => 'id' validate => array([maximum depth reached]) validationErrors => array([maximum depth reached]) validationDomain => null tablePrefix => '' plugin => null name => 'News' alias => 'News' tableToModel => array( [maximum depth reached] ) cacheQueries => false hasOne => array([maximum depth reached]) hasAndBelongsToMany => array([maximum depth reached]) actsAs => null Behaviors => object(BehaviorCollection) {} whitelist => array([maximum depth reached]) cacheSources => true findQueryType => 'first' order => null virtualFields => array([maximum depth reached]) __backAssociation => array([maximum depth reached]) __backInnerAssociation => array([maximum depth reached]) __backOriginalAssociation => array([maximum depth reached]) __backContainableAssociation => array([maximum depth reached]) findMethods => array( [maximum depth reached] ) Company => object(Company) {} Category => object(Category) {} [protected] _schema => array( [maximum depth reached] ) [protected] _associationKeys => array( [maximum depth reached] ) [protected] _associations => array( [maximum depth reached] ) [protected] _insertID => null [protected] _sourceConfigured => true [protected] _eventManager => object(CakeEventManager) {} [protected] _validator => null }
// $this->viewCache('news-'.$id);
$this->News->recursive = 2;
$singleNews = $this->News->findById($id);
'findById' array( (int) 0 => (int) 581 )
// $this->viewCache('news-'.$id);
$this->News->recursive = 2;
$singleNews = $this->News->findById($id);
(int) 581
'581'
'action' => $request->params['action']
));
}
return $method->invokeArgs($this, $request->params['pass']);
object(NewsController) { table_name => 'news' viewClass => 'Theme' theme => null paginate => array( [maximum depth reached] ) helpers => array( [maximum depth reached] ) usePaginationCache => true components => array( [maximum depth reached] ) name => 'News' uses => array( [maximum depth reached] ) request => object(CakeRequest) {} response => object(CakeResponse) {} viewPath => 'News' layoutPath => null viewVars => array( [maximum depth reached] ) view => 'index' layout => 'default' autoRender => true autoLayout => true Components => object(ComponentCollection) {} View => null ext => '.ctp' plugin => null cacheAction => false passedArgs => array( [maximum depth reached] ) scaffold => false methods => array( [maximum depth reached] ) modelClass => 'News' modelKey => 'news' validationErrors => null Session => object(SessionComponent) {} RequestHandler => object(RequestHandlerComponent) {} Email => object(EmailComponent) {} Cookie => object(CookieComponent) {} Auth => object(AuthComponent) {} News => object(News) {} Stat => object(Stat) {} [protected] _responseClass => 'CakeResponse' [protected] _mergeParent => 'AppController' [protected] _eventManager => object(CakeEventManager) {} } array( (int) 0 => '581' )
$controller->startupProcess();
$render = true;
$result = $controller->invokeAction($request);
if ($result instanceof CakeResponse) {
object(CakeRequest) { params => array( [maximum depth reached] ) data => array([maximum depth reached]) query => array([maximum depth reached]) url => 'news/581' base => '' webroot => '/' here => '/news/581' [protected] _detectors => array( [maximum depth reached] ) [protected] _input => '' }
));
}
$response = $this->_invoke($controller, $request, $response);
if (isset($request->params['return'])) {
object(NewsController) { table_name => 'news' viewClass => 'Theme' theme => null paginate => array( [maximum depth reached] ) helpers => array( [maximum depth reached] ) usePaginationCache => true components => array( [maximum depth reached] ) name => 'News' uses => array( [maximum depth reached] ) request => object(CakeRequest) {} response => object(CakeResponse) {} viewPath => 'News' layoutPath => null viewVars => array( [maximum depth reached] ) view => 'index' layout => 'default' autoRender => true autoLayout => true Components => object(ComponentCollection) {} View => null ext => '.ctp' plugin => null cacheAction => false passedArgs => array( [maximum depth reached] ) scaffold => false methods => array( [maximum depth reached] ) modelClass => 'News' modelKey => 'news' validationErrors => null Session => object(SessionComponent) {} RequestHandler => object(RequestHandlerComponent) {} Email => object(EmailComponent) {} Cookie => object(CookieComponent) {} Auth => object(AuthComponent) {} News => object(News) {} Stat => object(Stat) {} [protected] _responseClass => 'CakeResponse' [protected] _mergeParent => 'AppController' [protected] _eventManager => object(CakeEventManager) {} } object(CakeRequest) { params => array( [maximum depth reached] ) data => array([maximum depth reached]) query => array([maximum depth reached]) url => 'news/581' base => '' webroot => '/' here => '/news/581' [protected] _detectors => array( [maximum depth reached] ) [protected] _input => '' } object(CakeResponse) { [protected] _statusCodes => array( [maximum depth reached] ) [protected] _mimeTypes => array( [maximum depth reached] ) [protected] _protocol => 'HTTP/1.1' [protected] _status => (int) 200 [protected] _contentType => 'text/html' [protected] _headers => array([maximum depth reached]) [protected] _body => null [protected] _file => null [protected] _charset => 'UTF-8' [protected] _cacheDirectives => array([maximum depth reached]) [protected] _cookies => array([maximum depth reached]) }
App::uses('Dispatcher', 'Routing');
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch(new CakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding'))));
object(CakeRequest) { params => array( [maximum depth reached] ) data => array([maximum depth reached]) query => array([maximum depth reached]) url => 'news/581' base => '' webroot => '/' here => '/news/581' [protected] _detectors => array( [maximum depth reached] ) [protected] _input => '' } object(CakeResponse) { [protected] _statusCodes => array( [maximum depth reached] ) [protected] _mimeTypes => array( [maximum depth reached] ) [protected] _protocol => 'HTTP/1.1' [protected] _status => (int) 200 [protected] _contentType => 'text/html' [protected] _headers => array([maximum depth reached]) [protected] _body => null [protected] _file => null [protected] _charset => 'UTF-8' [protected] _cacheDirectives => array([maximum depth reached]) [protected] _cookies => array([maximum depth reached]) }
Mahalaxmi-5, Lalitpur
Bagmati, Nepal
Phone: 9801822891
Email: [email protected]