CGridView Filtering

Hello,

In my view of users admin panel i have default CRUD.

in my main config i have also set.




......

'components'=>array (

		'urlManager' => array (

			'urlFormat'=> 'path',

			'showScriptName' => false,

		),

.......

),

...



the problem is that when i am setting new parameters in next page, ex: i am in 3 or 2 page, and i am setting new search parameters

ex: role admins.

in first search it is ok, but in other hand what i do. adding new search parameter, also i am in 4 page. adding name is "Peter", and error.




Error 500: <h1>PHP Error [2]</h1>

<p>htmlspecialchars() expects parameter 1 to be string, array given (/web/app/common/lib/yii/framework/web/helpers/CHtml.php:66)</p>

<pre>#0 unknown(0): CWebApplication->handleError()

#1 /web/app/common/lib/yii/framework/web/helpers/CHtml.php(66): htmlspecialchars()

#2 /web/app/common/lib/yii/framework/web/helpers/CHtml.php(2124): encode()

#3 /web/app/common/lib/yii/framework/web/helpers/CHtml.php(109): renderAttributes()

#4 /web/app/common/lib/yii/framework/web/helpers/CHtml.php(1780): tag()

#5 /web/app/common/lib/yii/framework/web/helpers/CHtml.php(1186): activeInputField()

#6 /web/app/common/lib/yii/framework/web/widgets/CActiveForm.php(567): activeTextField()

#7 /web/app/backend/views/users/_search.php(10): CActiveForm->textField()

#8 /web/app/common/lib/yii/framework/web/CBaseController.php(119): require()

#9 /web/app/common/lib/yii/framework/web/CBaseController.php(88): UsersController->renderInternal()

#10 /web/app/common/lib/yii/framework/web/CController.php(866): UsersController->renderFile()

#11 /web/app/backend/views/users/admin.php(37): UsersController->renderPartial()

#12 /web/app/common/lib/yii/framework/web/CBaseController.php(119): require()

#13 /web/app/common/lib/yii/framework/web/CBaseController.php(88): UsersController->renderInternal()

#14 /web/app/common/lib/yii/framework/web/CController.php(866): UsersController->renderFile()

#15 /web/app/common/lib/yii/framework/web/CController.php(779): UsersController->renderPartial()

#16 /web/app/backend/controllers/UsersController.php(112): UsersController->render()

#17 /web/app/common/lib/yii/framework/web/actions/CInlineAction.php(50): UsersController->actionAdmin()

#18 /web/app/common/lib/yii/framework/web/CController.php(300): CInlineAction->runWithParams()

#19 /web/app/common/lib/yii/framework/web/filters/CFilterChain.php(133): UsersController->runAction()

#20 /web/app/common/lib/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()

#21 /web/app/common/lib/yii/framework/web/CController.php(1122): CAccessControlFilter->filter()

#22 /web/app/common/lib/yii/framework/web/filters/CInlineFilter.php(59): UsersController->filterAccessControl()

#23 /web/app/common/lib/yii/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter()

#24 /web/app/common/lib/yii/framework/web/CController.php(283): CFilterChain->run()

#25 /web/app/common/lib/yii/framework/web/CController.php(257): UsersController->runActionWithFilters()

#26 /web/app/common/lib/yii/framework/web/CWebApplication.php(328): UsersController->run()

#27 /web/app/common/lib/yii/framework/web/CWebApplication.php(121): CWebApplication->runController()

#28 /web/app/common/lib/yii/framework/base/CApplication.php(155): CWebApplication->processRequest()

#29 /web/app/backend/www/index.php(27): CWebApplication->run()

</pre>



ajax url after all request’s

localhost/admin/index.php/users/admin/ajax/users-grid/Users%5Bid%5D//Users%5Brole%5D/0/Users%5Busername%5D//Users%5Bemail%5D?ajax=users-grid&Users%5Bid%5D=&Users%5Brole%5D=0&Users%5Busername%5D=Peter&Users%5Bemail%5D=

any suggesting how to solve it?

one of suggestions can be change components urlFormat but this is not acceptable.

Go here for a solution. I got it from GSTAR, and it works perfectly minus the points I mentioned in the post.

thanks for replay