Enter Filter, Tab, filter text disappears and data is not filtered

Well, it is pretty much as it states in the title. I have a CGridView setup. I enter a filter into one of the fields and tab away to initiate the filter. However, rather than filtering, it seems to just clear the text I entered. The little "working" graphic appears briefly as if it is trying to do something. Any ideas what is going on?


   public function rules() {

      return array(                                                                                            array('nPublisherID, nOrderID, dateFulfilled, strTitle, strFirstName, strLastName, curAmount', 'safe', 'on'=>'search'),



   public function search() {

      $criteria=new CDbCriteria;

      $criteria->compare('nOrderID', $this->nOrderID);

      $criteria->compare('dateFulfilled', $this->dateFulfilled);

      $criteria->compare('curAmount', $this->curAmount);

      $criteria->compare('strTitle', $this->strTitle, true);

      $criteria->compare('strFirstName', $this->strFirstName, true);

      $criteria->compare('strLastName', $this->strLastName, true);

      return new CActiveDataProvider($this, array(






   public function actionAdmin() {

      $model=new Publisher_R('search');

      $model->unsetAttributes();  // clear any default values








   $this->widget('CGridView', array(






         array('name'=>'nOrderID', 'htmlOptions'=>array('width'=>70)),

         array('name'=>'dateFulfilled', 'htmlOptions'=>array('width'=>120)),

         array('name'=>'curAmount', 'htmlOptions'=>array('width'=>70)),

         array('name'=>'strTitle', 'htmlOptions'=>array('style'=>'text-align: left')),

         array('name'=>'strFirstName', 'htmlOptions'=>array('width'=>80)),

         array('name'=>'strLastName', 'htmlOptions'=>array('width'=>80)),



You need to check with a tool like firebug to see what data are send with the ajax call…

One thing that I noticed is that your model is “Publisher_R”, but then you check for $_GET[‘Publisher’])… could that be the reason…

Excellent! Such a simple little thing. The _GET was the problem, had to change it to Publisher_R. :D