Group Mods

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

Avatars Not Uploading, No Crop Function, Constant Issue (23 posts)

Started 2 years, 1 month ago by: Diesel Laws

  • Profile picture of Diesel  Laws Diesel Laws said 2 years, 1 month ago:

    Hi everyone.

    I have been having upload avatar issues for about 6 months and have ignored/turned those features off. But, I want it fixed.

    I recently upgraded to the latest WordPress MU 2.9.2. and latest Buddypress Version 1.2.3. To give you the back story, these issues have been happening since before BP 1.2 but I am unable to fix it still.

    Here are my details about my system ( according to this http://buddypress.org/forums/topic/when-asking-for-support ):
    1. WordPress MU 2.9.2.
    2. Directory
    3. Root
    4. Yes, 2.8.6 I believe
    5. No
    6. 1.2.3
    7. 1.2.1
    8. A few plugins, but none that I can see conflicting
    9. They were customised but overwritten with latest install – so no.
    10. Slightly in regards to avatars not working
    11. no
    12. bbPress built-in
    13. Few errors but nothing that relates
    14. Hostmonster

    Images I upload through the UPLOAD function in admin are uploading correctly and are being made into the crops (150×150 and 300×200) – but with Avatar uploads (and groups and BP Album uploads) I am getting nowhere.

    I have recently had the issue where the crop box doesnt even show up SCREENSHOT- http://freelancerunplugged.com/files/crop-problems.jpg

    Previously, the error was like other people when they would click accept after cropping but nothing would happen.

    I have a feeling there are problems with my rewrite rules or file storage issues but I have been unable to fix the problem using various posts on this topic. Also, please note that I do not have access to MISCELLANEOUS in the Settings area due to using WPMU.

    The website in question is http://freelancerunplugged.com

    Can someone please walk me through problem solving so I can finally get avatars back on my site (that arent from Gravatar) and so I can allow my users to upload pictures.

  • Profile picture of modemlooper modemlooper said 2 years, 1 month ago:

    Have you tried using the default theme? I notice to you have a ton of javascript files being loaded. Conflict?

  • Profile picture of Diesel  Laws Diesel Laws said 2 years, 1 month ago:

    I have just deactivated all plugins, reset to default theme and tried again. Same issue as the screenshot.

    What should I have in my rewrite file?

  • Profile picture of gian-ava gian-ava said 2 years, 1 month ago:

    Go to Settings -> Miscellaneous Settings
.
    Set “Store uploads in this folder” to “wp-content/uploads”.

    Set “Full URL path to files” to the REAL FULL PATH of your uploads.


    Then change “bp-core-avatars.php” line 389:

    Replace:

    
if ( !$path = get_option( 'upload_path' ) )
    
$path = WP_CONTENT_DIR . '/uploads';


    With:
if ( !$path = get_option( ‘upload_path’ ) )

    
$path = WP_CONTENT_DIR . '/uploads';
    
else
$path = ABSPATH . $path;

    It fixes the problem.
    Source: http://buddypress.org/forums/topic/avatar-upload-issues/page/2

    This is really something that need be fixed with the next release.

  • Profile picture of Diesel  Laws Diesel Laws said 2 years, 1 month ago:

    As I stated in my first post I dont’t have Miscellaneous settings on WPMU!

    Also, please note that I do not have access to MISCELLANEOUS in the Settings area due to using WPMU.

    Just to clarify visually:

    http://freelancerunplugged.com/files/nomisc.png

  • Profile picture of @mercime @mercime said 2 years, 1 month ago:

    @Diesel Laws, you’re right. There is no Miscellaneous settings in WPMU because avatar uploads go to
    e.g. BP in main blog_id_1
    wp-content/blogs.dir/1/files/avatars/ plus folders for user 1/ 2/ 3/ etc. and
    wp-content/blogs.dir/1/files/group-avatars/ plus folders for group 1/ 2/ 3/ etc.

    Can you see if your avatars and group-avatars folders were created in the /files/ folder?
    If they have been created, can you see the images uploaded as avatars in the 1/ 2/ 3/ etc folders inside avatars and group-avatars folders?

    If not, you might want to check folder permissions in your server, if 755 does not work then try 777 at /files/ folder. If that still doesn’t work, CHMOD 777 the /1/ folder

    In addition to the thread http://buddypress.org/forums/topic/avatar-upload-issues ,
    you could also deactivate all plugins and change to default theme, then re-upload BuddyPress via FTP or cpanel. Then activate BuddyPress plugin and bp-default theme and see if uploading avatar works.

  • Profile picture of Diesel  Laws Diesel Laws said 2 years, 1 month ago:

    The avatar folders are there and the main picture I upload is being saved in there, but it is not creating different sizes. On the page itself it is showing at this point SCREENSHOT- http://freelancerunplugged.com/files/crop-problems.jpg

    So for some reason, the whole cropping function is not even working. And I have tried it by disabling all the plugins except for buddypress and it still does the same thing.

    This morning I Automatically upgraded to the latest wordpress and latest Buddypress using the auto update buttons. I don’t really want to re-upload the whole thing again due to the time it takes and also (as it was just upgraded this morning) I do not believe it will change the current outcome. Unless you disagree then I will do it all again.

    The main blog folder (which is number 2) is now 777 and re-uploading a new picture did the same thing. Picture shows up in the FTP area, but no crops and the page shows the SCREENSHOT again – http://freelancerunplugged.com/files/crop-problems.jpg

    Apart from the glitch with the avatar not showing up to crop, I feel this is an issue that a lot of other people are facing but instead of fixing it they delete/ reinstall everything. And Im not really able to do that as the website has a few hundred poeple on it.

  • Profile picture of Diesel  Laws Diesel Laws said 2 years, 1 month ago:

    This may have something to do with it?

    My uploads for the avatars are automatically going into

    /wp-content/uploads/avatars (and then the number for the user)

    all my other photos uploaded to the blogs go into

    wp-content/blogs.dir/1/files

  • Profile picture of @mercime @mercime said 2 years, 1 month ago:

    These things come to mind
    1. Did you move BP installation from blog_id_1 to blog_id_2 during development or was your BP installed in blog_id_2 at the onset? I came across some cases like that while browsing online. Will have to search for those … just scanned over the info because those issues were not relevant to my installs, but what I recall is moving some folders in server and some DB manipulations.

    2. GD Library – when you upload images in posts/pages, does your install generate the 150px x 150px and 300px x 300px etc?
    Check if wp-content/blogs.dir/1/files/2009/12/ has original-image.jpg, original-image-150×150.jpg, original-image-300×300.jpg … because if it’s not generating thumbnails in regular media upload in posts/pages, then that might be the reason why it’s not cropping in your install and you might want to contact your hosting about GD library

  • Profile picture of Diesel  Laws Diesel Laws said 2 years, 1 month ago:

    1. To be honest, I am not sure how I could have done that if I did. I am pretty sure I installed it all normally then created a new blog (as the main blog for latest updates etc) but the main website should still be on blog 1. EDIT: Just checked and my main website blog is installed on ID 1.

    2. Yes, in that folder it is cropping correctly, and the above Screenshots have been uploaded to the website and they too have been cropped in the /wp-content/blogs.dir/1/files directory.

    Unfortunately it looks like we are back to square one! Thanks for the ongoing help mercime. Did you want a chance to dig around my ftp?

  • Profile picture of Mika Epstein (Ipstenu) Ipstenu said 2 years, 1 month ago:

    Interesting! I had a similar problem in my groups and when I looked at the source of my rendered page, the URL for the image was: /home/domain/public_html//group-avatars/1/avatar.jpg

    it looks like this function isn’t working right from bp-core-avatars.php

    function bp_core_avatar_upload_path() {
    	if ( bp_core_is_multisite() )
    		$path = ABSPATH . get_blog_option( BP_ROOT_BLOG, 'upload_path' );
    	else {
    		if ( !$path = get_option( 'upload_path' ) )
    			$path = WP_CONTENT_DIR . '/uploads';
    	}
    
    	return apply_filters( 'bp_core_avatar_upload_path', $path );
    }

    Calling upload_path is wrong. It should be upload_url_path – I don’t know if this is a WP 3.0 thing or not, but I’ll open a trac for it :)

  • Hey Guys, I’m running MU and I use this edit http://buddypress.org/forums/topic/url-being-retrieved-strangely I’m about to try another update so I haven’t tested if this still works with the newest update but I’ll let you know after I do a backup first :)

  • Profile picture of psyber Psyber said 2 years ago:

    @pandragon, did you have success with fixing the crop avatar issue?

  • Profile picture of Anointed Anointed said 2 years ago:

    I can report the same path issue with 3.0 running bp 1.2.3 in multisite mode. It is not saving the avatar in the /blog.dir/1/ path as it should. Bp is installed on root level of site.

    I also see the following server error:
    PHP Catchable fatal error: Object of class WP_Error could not be converted to string in /wp-content/plugins/buddypress/bp-core/bp-core-avatars.php on line 281

  • @psyber yeah I put back in my old edited version of the upload path which fixed the images not uploading but then the crop tools were missing after disabling a bunch of stuff it looks like headspace2 seo plugin was conflicting with the crop tooltip so I disabled it and using all in one seo instead :)