gridview filter Maximum call stack size exceeded

Hi,

In have an ajax-select to select one of two views (renderpartial) with one gridview (yiiwheels.widgets.grid.WhGridView) The renderpartials is ok (http://www.yiiframework.com/wiki/49/update-content-in-ajax-with-renderpartial/)

Two gridviews is related to the same model but show differents columns

sugerencias

incidencias

But my problem is with filters:

  1. Select sugerencias-gridview

  2. Select incidencias-gridview

  3. Filter incidencias-gridview

I get the error: Maximum call stack size exceeded

suggestion.php




<?php


if (Yii::app()->request->isAjaxRequest){

	Yii::app()->clientScript->scriptMap = array(

	    'jquery.js' => false,

	    'jquery.min.js' => false,

	    'select2.min.js' => false,

	    'select2.min.css' => false,

	    'font-awesome.css' => false,

	);

}


$this->widget('yiiwheels.widgets.grid.WhGridView', array(

	'id'=>'improvement-grid',

	'dataProvider'=>$model->search(),

	'filter'=>$model,

	'pager' => array(

		'maxButtonCount' => 10,

	),

	'columns'=>array(

		...

	),

	//WhGridView properties

	'fixedHeader' => false,

    'type' => 'striped bordered',

    'responsiveTable' => true,

));

?>



incidence.php




<?php


if (Yii::app()->request->isAjaxRequest){

	Yii::app()->clientScript->scriptMap = array(

	    'jquery.js' => false,

	    'jquery.min.js' => false,

	    'select2.min.js' => false,

	    'select2.min.css' => false,

	    'font-awesome.css' => false,

	);

}


$this->widget('yiiwheels.widgets.grid.WhGridView', array(

	'id'=>'improvement-grid',

	'dataProvider'=>$model->search(),

	'filter'=>$model,

	'pager' => array(

		'maxButtonCount' => 10,

	),

	'columns'=>array(

		...

	),

	//WhGridView properties

	'fixedHeader' => false,

    'type' => 'striped bordered',

    'responsiveTable' => true,

));

?>



How can I fix it? :mellow:

Regards,

Have you tried with the normal CGridView?

In firebug I get


(Minified)   - http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.min.js (2.2kb gzipped)



:blink:

With zii.widgets.grid.CGridView I dont have erros :huh:

To solve this error download jquery.ba-bbq.min.js from here and include it in your application:


Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/jquery.ba-bbq.min.js', CClientScript::POS_END);

I have tried that but error persists :mellow:

Have you registered the jquery properly?


Yii::app()->clientScript->registerCoreScript('jquery');

Yii::app()->clientScript->coreScriptPosition=CClientScript::POS_END;

Every time I change the select option, I get the same js files and css

Yes

Here there is a solution http://stackoverflow.com/questions/26041352/jquery-too-much-recursion-yii-cgridview

I have tried that too but is not a solution for my case, my gridviews are not dependent.They completely change by renderpartial