I have been working on the same CakePHP application for several months (no version migrations) and have recently run into an error that I can't seem to find any reason for its cause. The error message says it comes from line 4 of this file (Comment.php)
class Comment extends appModel {
var $actsAs = array(
'Containable'
);
var $belongsTo = 'Core';
public $validate = array(
'author' => array(
'rule'=>'notEmpty'
),
'body' => array(
'rule'=>'notEmpty',
'message' => 'You cannot leave a blank comment'
)
);
}
This comes up only when attempting to load the model:
Controller::loadModel('Comment');
For some context, each Core model relates to a form which can be commented on. The comments are related to the Core model via foreign key relation core_id. Each Core relates to only a single form and can have any number of comments.
The only other solutions to similar problems I can find were caused by migrating from one version of cake to another but I have been using the same version since beginning the project.