Hello, I have this question.
I’m using CAdvancedArBehavior to achieve some improvements on a model (Alumno).
And I want to export a list ( filtered and sorted ) to excel.
So I followed a tutorial and I added this on search method:
//Para reporte y exportacion
$_SESSION['alumno_datos_filtro'] = new CActiveDataProvider($this, array(
'criteria' => $criteria,
'sort' => $sort,
'pagination' => false,
));
But when I try to get data from that Data Provider i get a FatalError…
When I look in var_dump, I found this:
private '_m' =>
array
'CAdvancedArBehavior' =>
object(__PHP_Incomplete_Class)[65]
Why ? the class is incomplete?
I configured CAdvancedArBehavior like this:
in main.php
'import'=>array(
...
'application.extensions.CAdvancedArBehavior',
...
),
and in the model: Alumno
public function behaviors(){
return array( 'CAdvancedArBehavior' => array(
'class' => 'application.extensions.CAdvancedArBehavior'));
}
May be the class is not loaded completely ?
How to verify that?
Notice that the error has one letter in tehe name of the class NOT capitalized:
( ! ) Fatal error: method_exists() [function.method-exists]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition “CAdvancedArbehavior” of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition in C:\xampp\htdocs\yii-1.1.12\framework\base\CComponent.php on line 558
So I changed all the places in my source… but the problem stay.
Any idea ?
Best Regards