CakePHP标签插件分页问题
我在让CakeDC的标签插件工作时遇到了问题。我已经非常仔细地阅读了文档,但文档似乎很旧CakePHP标签插件分页问题,cakephp,tags,cakedc,Cakephp,Tags,Cakedc,我在让CakeDC的标签插件工作时遇到了问题。我已经非常仔细地阅读了文档,但文档似乎很旧 // Totally works. Does what it is supposed to do, does not // complain of missing models. $tag = $this->Upload->Tagged->find('tagged', array('by' => $tagname, 'model' => '
// Totally works. Does what it is supposed to do, does not
// complain of missing models.
$tag = $this->Upload->Tagged->find('tagged',
array('by' => $tagname, 'model' => 'Upload', 'conditions' =>
array( 'Upload.soft_delete !=' => 1) ));
// 100% correct according to the 3 year old documentation.
// Complains of a missing "taggeds" model.
// Table taggeds for model Tagged was not found in datasource default.
// Undefined index: tagged [CORE/Cake/Model/Model.php, line 2731]
$this->paginate['Tagged'] = array(
'model' => 'Upload',
'tagged',
'by' => $tagname);
$tag = $this->paginate('Tagged');
我在以下位置阅读了文档:
首先,我经历了重载属性$paginate的间接修改。。。在我将public$paginate=array();添加到控制器的顶部之前,此错误“无效”。这对另一个错误没有帮助
希望我错过了一些简单的东西
更新:我把代码改成这样
$this->Paginator->settings['Tagged'] = array(
'tagged',
'model' => 'Upload',
'by' => $tagname
);
$this->Paginator->paginate('Tagged');
我得到这个错误:错误:对非对象调用成员函数paginate() 我经历了重载属性的间接修改 $paginate…无效“错误 这是你的问题,不是真正的bug。CakePHP发生了一些变化,请尝试以下方法:
$this->Paginator->settings['Tagged'] = array(
'tagged',
'model' => 'Upload',
'by' => $tagname
);
$this->Paginator->paginate('Tagged');
欢迎您改进文档。我们目前免费维护14个插件,欢迎任何帮助。回馈并帮助改进文档。:)
我经历了重载属性的间接修改
$paginate。。。“无效”错误
这是您的问题,不是一个真正的bug。CakePHP有一点变化,请尝试以下方法:
$this->Paginator->settings['Tagged'] = array(
'tagged',
'model' => 'Upload',
'by' => $tagname
);
$this->Paginator->paginate('Tagged');
欢迎您改进文档。我们目前免费维护14个插件,非常感谢您提供的任何帮助。回馈一些东西,帮助改进文档。:)
我经历了重载属性的间接修改
$paginate…无效“错误
这是你的问题,不是真正的bug。CakePHP发生了一些变化,请尝试以下方法:
$this->Paginator->settings['Tagged'] = array(
'tagged',
'model' => 'Upload',
'by' => $tagname
);
$this->Paginator->paginate('Tagged');
欢迎您改进文档。我们目前免费维护14个插件,欢迎任何帮助。回馈并帮助改进文档。:)
我经历了重载属性的间接修改
$paginate。。。“无效”错误
这是您的问题,不是一个真正的bug。CakePHP有一点变化,请尝试以下方法:
$this->Paginator->settings['Tagged'] = array(
'tagged',
'model' => 'Upload',
'by' => $tagname
);
$this->Paginator->paginate('Tagged');
欢迎您改进文档。我们目前免费维护14个插件,欢迎提供任何帮助。回馈并帮助改进文档。我最终成功地将其添加到控制器顶部
public $components = array('Paginator');
然后用我的方法
$this->Paginator->settings['Tagged'] = array(
'tagged',
'model' => 'Upload',
'by' => $tagname
);
$this->Paginator->paginate('Tagged');
我最终在控制器的顶部添加了一些功能
public $components = array('Paginator');
然后用我的方法
$this->Paginator->settings['Tagged'] = array(
'tagged',
'model' => 'Upload',
'by' => $tagname
);
$this->Paginator->paginate('Tagged');
我最终在控制器的顶部添加了一些功能
public $components = array('Paginator');
然后用我的方法
$this->Paginator->settings['Tagged'] = array(
'tagged',
'model' => 'Upload',
'by' => $tagname
);
$this->Paginator->paginate('Tagged');
我最终在控制器的顶部添加了一些功能
public $components = array('Paginator');
然后用我的方法
$this->Paginator->settings['Tagged'] = array(
'tagged',
'model' => 'Upload',
'by' => $tagname
);
$this->Paginator->paginate('Tagged');
“错误:对非对象调用成员函数paginate()”以及“间接修改重载属性SearchController::$Paginator无效”“错误:对非对象调用成员函数paginate()”以及“间接修改重载属性SearchController::$Paginator无效”错误:对非对象调用成员函数paginate()以及“间接修改重载属性SearchController::$Paginator无效”“错误:对非对象调用成员函数paginate()”以及“间接修改重载属性SearchController::$Paginator无效”