[SOLVED] Production Mode Breaks Javascript in AJAX Response

I put Yii into production mode to see the speed difference from debug mode. Now any javascript that gets processed in the ajax response (renderPartial) does not execute.

If I put Yii back into debug mode, everything works fine.

I’m not really sure where to start looking for the problem. Anyone have any hints as to what might be going wrong?

Thanks!

Maybe delete the assets directories would help?

I deleted the contents of the ‘assets’ directory and reloaded but doesn’t make a difference :confused:

what exactly have you removed from your index.php and main.php config file to put it in production mode? Because I had no problemas at all whatsoever and my CMSs do make extensive use of AJAX and renderPartial

This line in the index.php file:




// remove the following line when in production mode

defined('YII_DEBUG') or define('YII_DEBUG',true);



I changed it from false to true. ** I keep saying this backwards; I changed it from true to false…

That’s the only change I made. Is there something in the main config I need to change as well?

The only significant change in main.php is the addition of the extendedclientscript extension.

** I commented extendedclientscript and everything is working in production mode. And wow, fast. Looks like I’ll be manually compressing/combining JS.

Thanks for the heads up :)

I also compile my scripts manually. I make sure the third party libs dont have compilation, packaging errors.

Congrats man