Closed (won't fix)
Project:
Drupal core
Version:
7.12
Component:
user.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Jan 2008 at 19:54 UTC
Updated:
11 Sep 2015 at 11:35 UTC
Jump to comment: Most recent
Comments
Comment #1
STNyborg commentedWould it help to uninstall (?) and reinstall the user module - can one do this? Guess that the system is confused about where to store the picture image path.
Please advice.
Svend
Comment #2
STNyborg commentedWhen adding a tmp folder to the files folder the problem was solved.
Comment #3
prabuthiru commentedthe same problem occur again
Comment #4
mizengineer commentedYou have to make path like this:
default/files/tmp/pictures
Hope that helps.
Can the directions/caption to enable pictures be changed in Drupal 6.10 ? Or eliminate this tmp directory completely?
Thanks :)
Comment #5
geerlingguy commentedThis bug keeps cropping up, especially when either (a) you move the files directory, and (b) you use drupal multisites (e.g. have /sites/example.com/files/pictures)
I have had two sites in the past week (one a clean install into a multisite directory, without ever moving any files, and the other a move from the /sites/default/files to /sites/example.com/files) have this exact problem.
I try uploading a picture for a user, and get:
And when I try updating/changing/anything to the "Picture image path:" on the admin/user/settings page, I get:
I notice this problem has cropped up over... and over... and over... – here's a forum topic on the same: http://drupal.org/node/148601
I hope this is not a duplicate issue...? Also, should it be pushed forward to 7.x then backported? I don't know if it's been fixed for 7 yet.
Comment #6
kasiawaka commentedI had the same problem, I enabled picture support and added
Picture image path: avatars
I created a folder in sites/default/files/avatars and changed it's permissions to 777.
When trying to save the changes, I was getting an error
"The directory avatars does not exist"
I followed #4 instructions, created also folder sites/default/files/tmp/avatars, changed tmp and tmp/avatars permissions to 777 and it WORKED.
Thanks for your help.
Comment #7
tinker commentedI had the same problem on one install after an upgrade. I ran the update script after unpacking the files. No matter what directory was specified the form submit would fail because "the directory does not exist". I managed to track this down to a faulty variable. I don't know how this happened but in my database the variable 'user_picture_path' was set incorrectly to plain text 'images/users' instead of the serialized version 's:12:"images/users";'
It seems that the 'variable_get' caused a cascaded problem through 'file_create_path' and caused 'file_check_directory' to fail.
Now that the variable is set correctly the User Settings page works correctly and I can change the directory to anything. With a new directory being created if it does not exist.
Comment #8
m_i_c_h_a_e_l commentedI just looked at my database, and I don't have a 'user_picture_path' table. I don't know much about databases, so I might have looked in the wrong place. There are 4 or 5 'user_' tables.
I only ran into the problem after I tried to set the directory for using a new default avatar. Now, as mentioned above, it won't accept anything, even the word 'pictures' which was there before.
My users have been able to add pictures successfully up to this point. I don't know if this new "directory does not exist" error will cause a problem.
Any suggestions?
Comment #9
tinker commentedLook in the "variable" table. There should be a row where name = "user_picture_path". You could using the following SQL query to find it.
It should contain a value like:
The "images/users" part is the relative path within [site-root]/sites/default/files/.
The 12 is the number of character in the path so if you use a different path you have to change this number.
ie "pictures" contains 8 characters so the value would be:
Comment #10
m_i_c_h_a_e_l commentedThanks so much.
I actually found it a couple of days ago, but your information is very helpful.
I did a stupid thing. When I browsed the "variable" table, it never occurred to me that there might be more than 1 page! Once I figured that out, I found the value, right where it was supposed to be.
Although I'm no expert, I always thought I knew my way around computers pretty well. Drupal has forced me to learn a lot more.
Always with help from the community. Thanks again.
Comment #11
cesar.romero commentedI must ask where [site-root] is defined. My "user_picture_path" variable is set to
s:8:"pictures";And "file_directory_path" is set to
s:5:"files";However, I keep getting the same error about the directory "pictures" not existing even though [site-root]/files/pictures and [site-root]sites/default/files/pictures exist and both are writable by apache.
Is it possible that drupal is using an absolute path using a value of [site-root] that I'm not aware of?
Comment #12
cyberwolf commentedSubscribing.
Comment #13
cyberwolf commentedFor me the problem was solved by creating the directory currently set as picture path (by default user/pictures) under sites/default/files. It turns out that the error message shown is about the current profile picture path, not the new one entered in the form. The error message should be heavily improved as this is not clear at all right now. The comment on a related forum thread, http://drupal.org/node/148601#comment-830482, got me on the right track.
Comment #14
vasheck commentedHere's my fix for D6.17...
I went to File System (admin/settings/file-system) and checked the settings...
There was an error displayed because I didn't have the right temporary directory created under /sites/default/files/
...therefore I created a new "tmp" directory under /sites/default/files/tmp and put the values as follows:
File system path: sites/default/files
Temporary directory: sites/default/files/tmp
Afterwards, I went to under "User settings" (admin/user/settings) and put the following values in:
(given that I had the "pictures" directory created under /sites/default/files/pictures/
Picture image path: pictures
Default picture: pictures/default.png
Now, I'm not getting any error messages...
Hopefully, someone will find this helpful.
Comment #15
hualahyja commentedI found that although I changed the variable value in the database, it seemed to take the old folder name set before.
In this case I just cleare the cache and everything worked.
Comment #16
raincloud commentedAfter trying all tips from all possible threads, I still had the "Directory does not exist" error.
Then I logged out, cleared session cookies, cleared domain cookies, cleared cache, logged in. The error is gone!
Comment #17
AliMartin commentedHi
I also had the same problem but, following all the good advice in this thread, also realised another gotcha.
I migrated a development website from my Windows laptop to my web server, only to see the same picture folder issue suddenly happen. The SQL transfer was done using Navicat and it's a great tool for looking at the tables, etc.
Yes, I had the pictures and tmp/pictures folders created with 777 permissions and the correct "user_picture_path" setting in the "variable" table.
However, there is also the "file_directory_temp" field and my value was set to the old Windows installation path, i.e. s:11:"c:\wamp\tmp
When I changed this to s:4:"/tmp" (not forgetting to have created the "tmp" folder with 777 permissions) I was able to save the "pictures" setting.
Hope this helps :o)
Ali
Comment #18
grendzy commentedThis isn't a critical bug; as several posters have discovered it's the result of configuration or permission problems. Further discussion is welcome in the post-installation support forum: http://drupal.org/forum/22
Comment #19
sarav.din33 commentedHi friends,
I dont know how to give the 777 permission to a folder in windows OS...
Guide me on this issue...
Comment #20
prokopton commentedHere's what worked for me on Ubuntu 10.04 LTS and PHP 5.2.x:
chown -R www-data:www-data /var/www/files/pictures/
chmod 775 /var/www/files/pictures/
You might want to use 777 if 775 doesn't work.
Comment #21
topdawg commentedHi tinker, thanks for this post because it worked after close to 2 hours of hair tearing (not too much hair left to begin with.)
I'm not sure of the exact reason but the SQL query was right on and it showed that only the first entry remained and nothing was saved beyond that. So I put in the new directory 'images/users' counted chars including the '/' and got 12 and entered that. Oh, I had a different directory and went back to the images/users because that's OK with me especially if I can move on with this.
I'm on 6.19, tried my Mac, Windows, Linux no dice but this worked.
Joe
Comment #22
fowlerjb commentedI had the same problems, followed the instruction in #9, cleared my browser cache and cookies and flushed the cache in Drupal...and it worked.
Thanks AGAIN to this awesome community!
Comment #23
geerlingguy commentedUpdating title, version and status... just to make it make more sense.
Comment #24
hermes_costell commentedNot a critical bug?!
I just encountered this issue and was forced to go directly into the database as post #9 put forth and then clear the cache to make the page wake up and notice. Setting the value via the page's form was absolutely impossible in this case. I chmodded the file structure to no avail. Going directly into the database and modifying the value directly the page then shows no error - when I put in the very same value I was attempting to put in via the form.
The rest of the items on the page (signature support, email customization, etc) cannot be saved because of this bug. Even setting it to "disabled" the mechanism still tries to validate the picture url!
Claiming it's not a bug because some people said it was the result of configuration or permission problems on THEIR PARTICULAR SETUP doesn't mean it's not a bug for OTHERS.
Edit: Please note I didn't catch that the status of the issue had been changed to Closed - won't fix rather than Closed(fixed). I cannot undo the "active" status I just gave the issue via this interface. Mods please?
Comment #25
hermes_costell commentedAha. I can change the status with a new comment. Okey dokey. Changing back to what geerlingguy had it as.
Comment #26
jalane81 commentedI've had this issue for almost 2 years and just didn't have time to care until tonight. Followed this thread and fixed the problem.
Had to change the variable value in the DB to 'tmp/pictures' and flush cache.
Thanks!!
Comment #27
eckersley commentedGreetings – I actually had this very same trouble… my user images stopped showing in the profile pages or elsewhere (actually, in Drupal 7) after I had changed a download setting in Configuration>Media>Filesystem. I found the simple fix was to change back to
Default download method: Public local files served by the webserver.I will try the above methods and report back if they resolve the issue when using the private local files setting by Drupal. When the images were not showing I noticed that my thumbnails were reported by my browser's Inspect Element tool to be in a subdirectory that did not even exist (localhost:system: etc). When I created the non-existant subdirectory and place an image in it, it would still not display.
Comment #28
deanflory commentedI had a bad path in mine that somehow ended up "locking-up" my ability to change the pictures folder/path setting. Nothing would work, no location, no folders or permissions on folders, nothing. It somehow got set to some "private://private://foldernamehere/[username ]/profile_pictures" path, don't know how the double private prefix got there, maybe an autofill of a form screwed with me.
I then saw elsewhere that someone had to change the variable directly in the database, but when you get there, it's in binary and not editable.
Hopefully this helps someone that's pulled ALL their hair out trying to work around something I believe is a pretty serious bug. No path should cause additional editing of the form field submission to be successful. Done, now back to actual work (or in Drupal speak, debugging even more lazy errors).
Comment #29
musubi commentedthank you deanflory this worked for me :)
Comment #30
nanabrownee commented@deanflory thanks for this - saved me a LOT of time