1

I have a Drupal site that I upgraded from Drupal 5 to Drupal 6. The users' profile pictures no longer display because they were contained under sites/default/files, and there is now no "files" folder under sites/default.

I wanted to make sure the imagecache module still worked, but it didn't -- when I tried to upload a picture Durpal told me it "could not move file". So I made a "files" directory under "sites/default/" to fix it. However, not only did this not work, it caused the CSS of the theme to not render, making my site a mess of plain old html.

After experimenting around, I found that nothing bad happens when I put a folder named "files" under any other directory (including "sites/all/"), and nothing bad happens when you put a differently named folder under "sites/default", but if I put a folder named "files" under "sites/default/", it causes the CSS to not render.

So my question is, what is causing this and how can I fix it? How can I have the directory "sites/default/files/" without causing my theme to not display?

James Dunn
  • 8,064
  • 13
  • 53
  • 87
  • 4
    This sounds like a permission problem - are you sure that Drupal (i.e. the server process executing the Drupal scripts, most often Apache) has write permissions to your 'sites/default/files' folder? The 'breaking' of the CSS is likely happening because CSS aggregation is turned on, and the aggregated file would normally be placed in the files folder as well (same with js aggregation). If the folder is not writable, the aggregation file(s) can not be placed there, and can thus not be picked up by the clients requesting it. – Henrik Opel Feb 15 '13 at 10:22
  • What is your OS: Apache or something else? – Max Feb 15 '13 at 10:30
  • @HenrikOpel: I tried making all the relevant folders writable (even public), and it didn't work. However, by a fluke, I finally got it to work, and now reading your comment I think your suggestion must be very close to what the problem was. I'll post an extended comment below. – James Dunn Feb 15 '13 at 16:20
  • @Max: I was actually given this website by the man who started it. It's hosted on Media Temple with their grid service. I am not sure whether or not it is an Apache server. – James Dunn Feb 15 '13 at 16:23
  • Extended Comment: the problem is fixed. I went to one of my nodes and edited it. When the page reloaded, there was an admin message saying a directory "sites/default/files/{random digits}.js" had been created. Because of my edit, the site automatically made the directory for me without breaking the theme. I then put the imagecached directory under this directory and behold! Profile pictures and image caching work once again. I examined the "files" folder afterward and found that the permissions were set to drwxrwxr-x. The aggregator module has been enabled and running this whole time. – James Dunn Feb 15 '13 at 16:30
  • To sum up, the problem is fixed but I'm not sure how, so I'm not answering my own question yet. If any one can explain to me what has caused this phenominon, I would be happy to accept your answer instead. – James Dunn Feb 15 '13 at 16:30

0 Answers0