Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of hnla

Avatar Upload Issues (111 posts)

Started 2 years, 2 months ago by: John James Jacoby

  • Profile picture of John James Jacoby John James Jacoby said 2 years, 2 months ago:

    There are numerous tickets in the trac and topics in the forums popping up. It seems lots of users are having issues uploading avatars with 1.1.2.

    I’ve tested this on two different environments with subdomains and subdirectory installs and cannot duplicate the problem myself. However, we’re aware that it’s an issue and will keep trying to resolve it.

    In the meantime, please route your avatar upload related discussion here. It will help us better monitor everyone’s experiences. Other topics regarding this issue will be locked and linked to this topic until it is resolved.

    Thanks everyone for being awesome and patient and understanding. :thumbup:

  • Profile picture of nexia nexia said 2 years, 2 months ago:

    i faced this problem in my new installation, so i will replicate it and report the results on bug fixes as soon as i’m decided on what theme i use for that site.. lol

  • Profile picture of 21cdb 21cdb said 2 years, 2 months ago:

    @JJJ: Have you ever tried adding wp_enqueue_script( ‘thickbox’ ); to one of ur environments? This is what causes the upload issue on my two local installations. From what i read most plugins utilise this wordpress bundled function and i guess this could be a good starting point for further investigations.

  • Profile picture of Manoj Kumar talk2manoj said 2 years, 2 months ago:

    @jjj : It seems to me that BP is not trapping the GD Lib error while creating a thumbnail when using wp_create_thumbnail function in bp-core-avatars.php around line no. 250 resulted, it render the Cropper UI without an image and without any error.

    In this case while all file permission and everything are correct. But user won’t find his file on FTP because BP deletes the original file if its not in correct size.

    So I would suggest that before reporting any avatar upload issue here on forum user should check that file permissions are correct and its creating thumbnails.

    A very simple way to test this is.

    1. Login to the admin interface with admin
    2. Goto Media -> Add New and try uploading any image

    - If upload works correctly, which means file permission are ok. If not check the file permission
    - If upload works correctly, check that its creating thumbnails in 150X150 and 300X300 (default) for bigger images. This can be check by going to wp-content/blogs.dir/–Your Upload path–

    If both are correct avatar upload might work.

    Hope this helps :)

  • Profile picture of nexia nexia said 2 years, 2 months ago:

    if Manoj’s error is what cause the problem, “maybe” it would be forced to have that verification made on the BP install, as a prerequisite… btw, i think it is already checked on WP install, as it is required to upload any media…

  • Profile picture of Hadar Hadar said 2 years, 2 months ago:

    OK, I’m one of the people who started a thread on this a couple of weeks back.

    I just followed the advice above given by Manoj. I am able to upload files via Add New Media, so indeed the file permissions are correct (which I noted in my previous posts).

    But, when I upload a 700×700 image, it uploads correctly but I get no thumbnail images, so perhaps that is indeed the problem.

    When I upload an Avatar (175×100 in all of tests so far), the directory “1″ successfully gets created under the “avatars” directory, but no files appear there.

    How do I specifically test for the GD Lib error mentioned above, and even better, how do I fix it if that’s the problem?

  • Profile picture of John James Jacoby John James Jacoby said 2 years, 2 months ago:

    At that point I really think this sounds like some kind of conflicting JavaScript issue. This cropper is solid because it’s the same library used by WordPress 2.9′s image cropping feature, and I think it’s even the same one that Gravatar uses ( which fits the roadmap ability of being able to import a gravatar via the BuddyPress interface. )

    Check if any other plugins are adding conflicting JavaScript, and see if there are any errors occurring in your site.

  • Profile picture of Hadar Hadar said 2 years, 2 months ago:

    OK, my problem isn’t completely solved, but Manoj was right about what was going on for me. When I upgraded php to 5.3, somehow, I left off “–with-gd” in my build (I used to build with it). So, because the GD lib was missing, the upload was failing, having nothing to do with file permissions.

    Now, I can successfully upload a file, but once the file is uploaded, I get sent to the “Crop” screen, and no matter what I do there (move the crop box around, leave it alone, etc.), when I press the Crop button, again I fail. So, I can’t get the new avatar to display (yet), but at least it uploads to the correct directory.

    One step closer! :-)

  • Profile picture of terryw terryw said 2 years, 2 months ago:

    I’ve looked through this thread and can’t seen any reference to my particular problem I don’t think.

    When I try to upload new avatars to a new WPMU+BuddyPress installation the following message is displayed:

    Upload Failed! Error was: Unable to create directory /var/www/vhosts/terrywassall.org/httpdocs/blogs/wp-content/blogs.dir/1/files/avatars/3. Is its parent directory writable by the server?

    There is a folder called:

    blogs.dir 4.00 KB rwx r-x r-x Nov 6, 2009 apache apache

    but it is empty and I do not have write access to it of change permissions.

    Installation versions:
    WordPress MU 2.8.5.2.
    BuddyPress Version 1.1.2

    I would be grateful for any suggestions.

    PS I also get the following message when I try to upload a file (pdf so permitted type)

    Unable to create directory /var/www/vhosts/terrywassall.org/httpdocs/blogs/wp-content/blogs.dir/1/files. Is its parent directory writable by the server?

    I assume this is the same problem?

  • Profile picture of nexia nexia said 2 years, 2 months ago:

    @terryw, your problem is actually not related to any bug here, but is based on the chmod, as the errors are clearly in english, the script is unable to create or write these folders, so the configuration of your server does not have create access in one or more directories… ask your webmaster then…

  • Profile picture of sitequest sitequest said 2 years, 2 months ago:

    I am having a similar issue. When creating a new group… and I get to the upload a avatar step (3) the page is blank (no upload field appears) and I can not get to step four. It does setup the group however and if I go to my groups page and edit the new group, I then can go to step (3) and the upload field appears and works great. Does anyone know why it’s not working when I try to create the group in setup?

  • Profile picture of terryw terryw said 2 years, 2 months ago:

    @nexia Thanks. I have contacted my ISP host and will see what happens. I’m probably out of my depth with this but will persevere. I thought maybe there was some edit I might have to do in a configuration or other file rather than a bug.

  • Profile picture of terryw terryw said 2 years, 2 months ago:

    @nexia. Problem sorted! I contacted my web hosting service as you suggested. I had to run a script on-line (by filling out a form) to ”install php as a cgi module” and then they gave me permissions to the requisite folders and files. In addition I had to paste 3 lines of code into the .htaccess file in the document root folder. Now avatars upload and crop and I can also upload files. Thanks for the advice.

  • Profile picture of Rmwb Rmwb said 2 years, 2 months ago:

    sudo aptitude install php5-gd

    fixed the problem for me :)

  • Profile picture of Dizziness Dizziness said 2 years, 2 months ago:

    Thanks but both permissions and thumbnail creation works for me but avatar and group avatar uploading does not.

    EDIT: Correction, I can upload avatars after clearing out the user’s avatar folder via FTP. Unfortunately, I cannot delete these new avatars from the user’s Profile page without using FTP. So it does appear to be a permissions issue, where Buddypress cannot delete existing avatars. Ideas?

    EDIT again: I found this old post from 1.1 on permissions. I expect this will help: http://buddypress.org/forums/topic/surprising-avatar-behavior