Hello, this is my first post to this forum.
I have an operational website on my development machine: Ubuntu, Apache, MySQL, Yii framework, that is working exactly the way I want it to. I am also using javascript, ajax, css and jquery for user interface purposes.
On the hosted service, The system’s basic functionality works - menu systems, maintaining basic data in the database, menu functions etc. so it appears as though Yii is working properly.
I am having problems with registerPackage. In my /YiiSites/mysite/protected/config/main.php file I have the following lines to define the packages I need in the application which is identical to the configuration on my development site:
'clientSript' => array(
'packages' => array(
'doT' => array(
'basePath'=>'application.assets'
'js'=>array('doT.min.js'),
),
'todo' => array(
'basePath'=>'application.assets',
'js'=>array('todo.js'),
'css'=>array('todo.css'),
'depends'=>array(
'jquery',
'doT',
)
),
'updateWO'=> array(
'basePath'=>'application.assets',
'js'=>array('updateWO.js'),
'css'=>array('todo.css'),
'depends'=>array(
'jquery',
'doT',
),
),
),
),
On in my view that uses these javascript files I have the following line of code:
<?php Yii::app()->clientScript->registerPackage(‘todo’); ?>
Which I would expect to create several lines of HTML code in the target containing <script src=“todo.js location”></script><script src=""><script src=“doT.js location”>. The problem is that these lines of code are not showing up in the resulting HTML code. Once the HTML is rendered I do not see these lines in the page source. I am using FireBug on FireFox and don’t see any errors regarding this code block. Anyone have any ideas on why this is not working on the “production” configuration?