That’s strange
I’d tried to use exist validator today and exception happened only 2 - 3 times and then it had disappeared.
But I’ve noticed that exception rised not during insert_post but after redirecting to the /post/view/<id>.
At the moment I can’t reproduce this strange behaviour.
My code
public function rules() {
return array(
array('title', 'required'),
array('content, idParent, category, tags', 'required', 'on'=>'insert_post'),
array('idParent', 'exist', 'on'=>'insert_post', 'attributeName'=>'id', 'className'=>'Post'),
array('idUser, idCategory, status, type, order, idParent', 'numerical', 'integerOnly'=>true), // !XXX: can be deleted in release
array('commentsAllowed, pingable, withoutPurification', 'boolean'),
array('category, title, content, tags, commentsAllowed, pingable,withoutPurification', 'safe'),
array('order', 'safe', 'on'=>'insert_page'),
array('idParent', 'safe', 'on'=>'insert_post'),
array('id, idUser, idCategory, title, created, updated', 'safe', 'on'=>'search'),
);
}