nlsclientscript icon indicating copy to clipboard operation
nlsclientscript copied to clipboard

Unable to upgrade to NLSClientScript v6 from v5

Open fortm opened this issue 8 years ago • 1 comments

With Yii 1.1.14 code base, I am using NLSClientScript v5.0 and it works well , but i needed to merge js and css files into one file and minify them.

The way I am using Yii is i have not used Yii ajaxButtons but instead all Controllers return HTML as JSON payload and then in client side - jquery onSuccess function does $("#div").html(data.page)

I have tried in vain to upgrade to 6.* of NLSClientScript and many other extensions in yii. There are more than 10 YII modules and thousands of lines in Javascript that I inherited with my project to interface with YII controllers and there are some cyclic dependencies too. The Yii module classes are calling their javascripts in init()

Everything works with NLSClientscript 5 and breaks apart without it, so it is hard dependency. There is scope of improvement in javascripts written here but I badly need to upgrade to higher version of NLSCLientSript for extra optional features like CSS and JS since right now per refresh is taking +50 HTTP requests downloading JS and CSS.

Can you please assist on what could be causing hard coupling with v5 of NLSClientscript that is not upgradable.

Thanks

fortm avatar Mar 12 '16 15:03 fortm

I was able to also use without issues v6 just now, but as soon as mergeJs is enabled ,then after deleting assets when I am doing full page refresh, following errors have started coming - Uncaught ReferenceError: jQuery is not defined Uncaught ReferenceError: $ is not defined(anonymous function)

fortm avatar Mar 12 '16 16:03 fortm