Going to admin > settings > users before admin > settings > file system creates '/pictures' not '/files/pictures'. So then I tried to upload my picture and got an upload error.

Returning to admin > settings > users AFTER going to file system created /files/pictures and I could upload just fine.

Do users really have to manually go to admin > settings > file system THEN admin > settings > users to create these directories properly. Why not automate it as part of the installation?

Comments

magico’s picture

Title: Going to admin > settings > users before admin > settings > file system creates '/pictures' not '/files/pictures' » Folders are created at wrong places if we do not follow an order
Version: 4.7.2 » x.y.z
Priority: Minor » Normal

Agree. Required folders should be create when doing Drupal instalation.

RobRoy’s picture

Title: Folders are created at wrong places if we do not follow an order » Must access "File system" settings page to create "files" upload folder, uploading silently fails otherwise
Version: x.y.z » 5.x-dev

Do a clean install of Drupal, enable upload module for pages, then create a new node with an uploaded file attachment (do not create a files directory or access the "File system" settings page yet). The file will appear to have uploaded, but when you click on the link a Page Not Found error is displayed. Why? Because you didn't go to http://example.com/admin/settings/file-system first to create your "files" directory.

No watchdog or error message is generate by upload.module either, it just silently fails. I've submitted a seperate issue to upload.module as this one should mainly deal with where we should be attempting to create the "files" directory. It could result that the answer is "won't fix" and we'll just include a file_check_directory() in upload.module somewhere so the the first upload creates the "files" directory like the "File system" settings page.

There are two issues here, the critical one (http://drupal.org/node/98391) is with upload.module silently failing, the other (this one) is figuring out where/if to automatically create the "files" directory

  1. Include some sort of file_check_directory() in upload.module since new users will have no idea that they must manually go to the File system settings page to have their "files" directory created.
  2. Upload.module needs to be generating some sort of error message if the "files" directory cannot be automatically created in #1 and not pretend to upload these files then result in 404 errors when viewing them.
  3. Maybe include the creating of the files directory as an installer textfield or simply automatically attempt to create the default files directory on install.
webernet’s picture

Status: Active » Fixed

An error is now generated by the status report if the files directory hasn't been setup.

Anonymous’s picture

Status: Fixed » Closed (fixed)