Why does CJuiWidget not using registerCoreScript

when I want to use jquery-ui source code (not the min version) i edited the ‘framework/web/js/packages.php’ file to: (only the jquery.ui section)


		'js'=>array(YII_DEBUG ? 'jui/js/jquery-ui.js' : 'jui/js/jquery-ui.min.js'),



then, because I use the CJuiAutoComplete too, I got 2 script tags for jquery-ui.js AND jquery-ui.min.js

After some digging, i’ve found out that CJuiWidget->registerCoreScripts function is not using ClientScript->registerCoreScript(‘jquery.ui’). Instead it registered the script files manually. See bellow:

protected function registerCoreScripts()





		else if(is_array($this->cssFile))


			foreach($this->cssFile as $cssFile)




// should use $cs->registerCoreScript() <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?



		else if(is_array($this->scriptFile))


			foreach($this->scriptFile as $scriptFile)




Is it a bug? Or am I doing it wrong?

You probably mean, it doesn’t use the package system. There’s a ticket for this here:


BTW you should not edit packages.php. Instead you can configure the packages property of your clientScript application component.