I have an extenstion that loads jquery.cookie.js file. It works fine on my local machine, but it doesn’t work in production. It says: “Failed to load resource: the server responded with a status of 404 (CHttpException)” when trying to load jquery.cookie.js file.
I have checked that this file loads successfully into assets folder, but it for some reason cannot be loaded. I do not know where to look at.
These are line that register js:
$path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
$assetUrl = Yii::app()->assetManager->publish($path, false, -1, YII_DEBUG);
Yii::app()->clientScript->registerScriptFile($assetUrl.'/jquery.jstree.js');
Yii::app()->clientScript->registerScriptFile($assetUrl.'/_lib/jquery.cookie.js');
Yii::app()->clientScript->registerScriptFile($assetUrl.'/_lib/jquery.hotkeys.js');
There are problems only with jquery.cookie.js file.
I even tried to put jquery.cookie.js into “js” folder, it works on localhost, but doesn’t work on server.
I am quite new in Yii and this is very strange error, I cannot understand even where to look at…
I thought maybe it is wrong to register jquery.cookie.js, as it is in yii core? But if I remove registerScrhiptFile than I am getting "jQuery cookie plugin not included." in "jquery.jstree.js" (that is loaded by extension).
You can see this error here: http://www.taviemmatiem.lv/backend/categories/index
Really, need your help.
:::
The strange thing is that if I change jquery.cookie.js to jquery.coo.js that it works fine. So I see that here is something with yii core.
R.