-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CGridView and other widgets should use registerPackage to provide dependency. #1033
Comments
Was this fixed now? I can't find any zii widget packages in |
Sorry, i was misguided by the "Closed" button, which relates to my ticket #147, not this one. |
+1 for resolving this issue. It causes us problems every time a new version of Yii comes out because I keep forgetting to keep our overridden classes in sync with the latest yii changes. It would be nice not to have to override the classes ;) Background info: In our project, we override the
We get round this by putting everything in packages and generating the packages at deploy time on each server using @mikehaertl's packagecompressor. Original Yii code:
Our replacement:
and in the clientscript component:
|
Hi guys!
Manual image publishing is the best I've come up with so far, which is not really much. |
@schmunk42 - We never did get round that problem. I expect the reason it's not a issue for us is because we don't use any of the css or css background images in gridview and listview - i.e. we have 100% re-styled them in our common css files (that we package using the packagecompressor ). Thanks for pointing out the potential issue. |
+1 . really it is much more efficient then setting a baseScriptUrl. |
I solved that using nginx cache. As Nginx is our frontend server, the one that handles port 80 calls. If it does not exist, then it requests the assets. All css/js/img/assets are always served by nginx. The first time they are fetched from apache, but later, it is cached, so there's no need to fetch them again. If you need I can post my configuration. |
Thanks @luislobo, but we use Amazon Elastic Load Balancing, so don't have the option. One solution we tried is a custom version of packagecompressor which can publish Yii assets to Amazon S3 (therefore hosted in a place easily shared by all servers) - it works ok, but is a rather complex solution, i.e. many moving parts. |
Currently there is no way to register a dependency of CGridView asset files like CSS. We envision that widget should use instead of registerCssFile the registerPackage directive, so that you can build dependencies later on (custom extension, gridview theme override)
The text was updated successfully, but these errors were encountered: