cakephp - cakephp的简单标记行为等效于2.x

标签 cakephp error-handling tags tagging

我正在尝试使用http://bakery.cakephp.org/articles/dooltaz/2007/05/02/simple-tagging-behavior,但/app/models/behaviors/tag.php上的代码导致此错误:“

Error: Call to a member function find() on a non-object



“..

我已经将function setup(&$model更改为function setup(Model $model等。.也将文件名从 tag.php 更改为 TagBehavior.php ..

我猜这是因为$Tag =& new Tag;所致,因为它接近$res = $Tag->find( ..如何将其转换为2.x(我使用的是Cake 2.4.3)?还有什么导致此错误?

最佳答案

该插件很古老,已经有6年历史了,根本没有测试,也没有写得很好。

请尝试CakeDC Tags plugin

关于cakephp - cakephp的简单标记行为等效于2.x,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21829927/

相关文章:

grails - 处理 Grails 域类验证错误的最佳方法

ios - Swift iOS - 标签 Collection View

php - 在代理服务器后面时从 CakePHP 访问数据库

MYSQL 到 CakePHP

web-services - javax.naming.NameNotFoundException : Name jdbc is not bound in this Context

java - GAE Cloud Endpoint 生成客户端库时出错 - java.lang.IllegalArgumentException

java - 是否可以在资源(AKA int)上 setTag() ?

django - 在 Django 中,是否有一种简单的方法可以在模板中将文本字段呈现为模板?

ubuntu - CakePHP 错误 : cake_core_ cache was unable to write 'cake_dev_en-us' on Ubuntu 14. 04

mysql - 具有多态关联的数据方案