1

There are no JavaScript and CSS files in the following folders:

/home/vhost/WWW/mysite.com/sites/default/files/js
/home/vhost/WWW/mysite.com/sites/default/files/css

All the folders are empty. Can i populate the folders with aggregated css and js files from another drupal installation that is the same?

Update: thx to googletorps and sheenas ideas and hints regarding the special constitution of the aggregated css and js-files i just have had a closer look at them - which are based on my local (!!!) installation of the exacly same installation - a drupal commons: for the sake of a better understanding the aggregation of the hashed files i add the output of the shell here:

we see the files how the should (!!!) look like:

here we see the css-files

linux-vi17:/srv/www/htdocs/com624/sites/default/files/css # ls -l
insgesamt 872
-rw-rw-r-- 1 wwwrun www 158526 22. Jan 12:10 css_2c40e29bada7df2a0872e3284d5906c0.css
-rw-rw-r-- 1 wwwrun www 164051 22. Jan 12:04 css_509f375f4dd1349c65961ef65612b39f.css
-rwxrwxrwx 1 root   www  62359 20. Jan 23:35 css_715c2ea6e483943b9fb7a7870eb8d3af.css                                                                           
-rwxrwxrwx 1 root   www 163905 20. Jan 23:35 css_7d8ae0563cfe8042f1ae8c8b997decaf.css                                                                           
-rw-rw-r-- 1 wwwrun www 158378 22. Jan 12:08 css_ad58026023b58c62611ee2690b7767ed.css
-rwxrwxrwx 1 root   www 164051 20. Jan 23:52 css_dc93777fb44b0e70ce92cdbc3fb098e9.css                                                                           
-rwxrwxrwx 1 root   www    869 20. Jan 23:35 css_dfe74e375bbbe435aaa2c17f83c4843a.css                                                                           
linux-vi17:/srv/www/htdocs/com624/sites/default/files/css # 

and here the javascript-files

linux-vi17:/srv/www/htdocs/com624/sites/default/files/js # ls -l
insgesamt 2004
-rw-rw-r-- 1 wwwrun www 252042 22. Jan 12:09 js_49eafedecb47a7ddbcbaca1afe9934bd.js
-rwxrwxrwx 1 root   www 116020 20. Jan 23:35 js_5b2fd4858d6549bf716717a2aeff7ec8.js
-rwxrwxrwx 1 root   www   2619 20. Jan 23:35 js_5e4cf1f9d580681533f28941e5369206.js
-rw-rw-r-- 1 wwwrun www 291843 22. Jan 12:04 js_7308bd15ff335fb80932a983f43a674e.js
-rw-rw-r-- 1 wwwrun www 244292 22. Jan 12:08 js_7fccee0ff92c41edc64dbe9af3cc42d5.js
-rwxrwxrwx 1 root   www 291843 20. Jan 23:52 js_b03baa42e9679d7c9bfa96bf43b644de.js
-rwxrwxrwx 1 root   www 291460 20. Jan 23:35 js_b6a467b980c752283820195189e6e5e0.js
-rw-rw-r-- 1 wwwrun www 289758 22. Jan 12:10 js_c97e31b30c535ae5779711f7966b6096.js
-rw-rw-r-- 1 wwwrun www 252637 22. Jan 13:49 js_e4cc5b6ab05a295dab73ce5aac20ac1d.js
linux-vi17:/srv/www/htdocs/com624/sites/default/files/js # 

Note: and what we can see here in a good way - the files are generated at different times. (note this is not!!! the mentioned site with the broken style - this is a site that is runned locally on the local lampp)

Well what makes me wondering is the following fact we have very differnet owners of the files - see that we have sometimes have

root   www
wwwrun www 

question: why is this so!? i do not understand this! OR wait - the owernship corresponds with the permission (chomod..) what do you think? in othe words: is there a relationship between the permission which is in one case pretty much/ high ]

-rwxrwxrwx 1 root   www   2619 20. Jan 23:35 js_5e4cf1f9d580681533f28941e5369206.js

and in the other case pretty low / weak and this correspondents/results in the wwwrun-user:

-rw-rw-r-- 1 wwwrun www 291843 22. Jan 12:04 js_7308bd15ff335fb80932a983f43a674e.js

latest Update: after adding the files i have the following results: http://campus-24.com/?q=home

  • 1
    those CSS and JS folders are where Drupal will store the compressed CSS and JS files that it generates when you have CSS aggregation turned on. If your file permissions are incorrect, you have never turned CSS/JS aggregation on for your site, or some other error is preventing these files from being generated, then it would be expected that those folders are empty. Adding CSS or JS to those folders will not help you situation at all. – sheena_d Jan 23 '12 at 20:26
  • hello dear sheena - thx alot - you helped me a week ago. 'Just remember the campus-24.com issue. You were right - Pursuing the right path is the way to go! The file permissions were wrong - i have to work on this issues first! Thx for your help! Greetings zero – zero Jan 23 '12 at 21:09
  • see above - i added some updates: how do you like this: thx to googletorps and sheenas ideas and hints regarding the special constitution of the aggregated css and js-files i just have had a closer look at them - which are based on my local (!!!) installation of the exacly same installation - a drupal commons: for the sake of a better understanding the aggregation of the hashed files i add the output of the shell here: we see the files how the should (!!!) look like: – zero Jan 23 '12 at 21:55
  • Well what makes me wondering is the following fact we have very differnet owners of the files - see that we have sometimes have root www wwwrun www question: why is this so!? i do not understand this! – zero Jan 24 '12 at 0:03
1

If your two Drupal installs are exactly the same, it is possible. Your biggest problem will be figuring out the name of the files, since they will have some hash value generated by Drupal. I don't know exactly how this is generated, but yes it is possible.

Now while this is possible, it's not a long term solution. If you had a live site, and something was failing to generate the aggregated css and js files, it could be a quick short term solution until the real problem was found and fixed.

I believe that you have asked about this already and received answers about file permissions etc, some of this which doesn't belong here, since it's about setting up a server and not Drupal itself. I would advise against pursuing this path, and instead try to resolve the real issue. If you want to upload files, use image cache and a lot of other modules and features you need to resolve this anyways. Making a hacky unstable solution will do you no good.

  • hello dear gooogletorp - thx alot - this helps me. Pursuing the right path is the way to go! On a sidenote: yes i guess that this hashed values are very special. Note: the drupal installations are exactly the same... but i now believe that i miss the right path if i solve the problem with a hack! greetings zero – zero Jan 23 '12 at 21:07
  • dear googlethorp see above - i added some updates: how do you like this: thx to googletorps and sheenas ideas and hints regarding the special constitution of the aggregated css and js-files i just have had a closer look at them - which are based on my local (!!!) installation of the exacly same installation - a drupal commons: for the sake of a better understanding the aggregation of the hashed files i add the output of the shell here: we see the files how the should (!!!) look like: – zero Jan 23 '12 at 21:55
  • Well what makes me wondering is the following fact we have very differnet owners of the files - see that we have sometimes have root www wwwrun www question: why is this so!? i do not understand this! – zero Jan 24 '12 at 0:03
  • @zero Hard to say, my guess would be that you copied the site from somewhere with some styles which are then created by root, and the wwwrun are created by the web server on your local machine. Try deleting all files and clear cache and see what you get. – googletorp Jan 24 '12 at 8:55
  • hu Googletorp tx for reviewing - i try to do so. I let you know what happened. BTW have a look at the corresponding thing: i noted it at the end of the posting.... in other words is there a relationship between -rwxrwxrwx 1 root www 2619 20. Jan 23:35 js_5e4cf1f9d580681533f28941e5369206.js -rw-rw-r-- 1 wwwrun www 291843 22. Jan 12:04 js_7308bd15ff335fb80932a983f43a674e.js – zero Jan 24 '12 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.