registerScriptFile of Yii built-in widgets isn'tset CClientScript::POS_*

registerScriptFile in Yii built-in widgets isn’t set CClientScript::POS_*

If you load your’s jquery , and set:


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



then ,use CListView , or CJuiWidget, or CFlexWidget, or CGridView, will get a js error : jQuery not defined.


  1. wait for upgrade.

  2. or ,you can do :

    copy the widget class file to views/widgets, modify registerScriptFile line , and append CClientScript::POS_BEGIN.

    in you script, code like : $this->widget(‘application.views.widgets.CListView’…);