Forums

User Avatar
[Plugin: User Avatar (23 posts)

  1. baszer
    Member
    Posted 1 year ago #

    The plugin is not working. I can upload a picture, but after i hit the crop botton nothing is created or showed?

    What do i do wrong?

    http://wordpress.org/extend/plugins/user-avatar/

  2. oltdev
    Member
    Posted 1 year ago #

    Hi baszer,

    Our testing environment was using WP 3.0 + and we've tested this plugin on Firefox, Safari, IE 7+ and know it works for other standard browsers as well. Please make sure that both your WordPress and Internet Browser are working. With the information you have provided it is difficult for me to figure out if there is a problem with the plugin. Also, please grab the latest version and replace the current version of User Avatar on your host. Try to re-activate the plugin and see if that helps out.

    Please also remember that this plugin is made directly for People Lists (http://wordpress.org/extend/plugins/people-lists/) to make it easier for users to upload their photos...something that should be in the core! =]

    Hope this helps,
    ctltdev(former oltdev)

  3. cperugino
    Member
    Posted 1 year ago #

    Hi,

    I'm having the same problem as baszer. I can choose a picture on my computer, I can press the upload button, I can crop the image, but after that in the Here's your new picture... dialog, the old picture stays there.
    I installed the latest version and tried in Firefox 3.6.8, IE 8.
    I also tried setting permissions to 777 to your plugin's directory.
    Any ideas?

    Thanks
    Chantal

  4. oltdev
    Member
    Posted 1 year ago #

    Hey cperugino,

    We have set the plugin's upload directory to 777 permission, so that shouldn't be an issue...

    if( !file_exists(WP_CONTENT_DIR."/uploads/avatars/") )
    	mkdir(WP_CONTENT_DIR."/uploads/avatars/", 0777 ,true);

    Check to make sure there's a folder inside your 'wp-content' that is called 'uploads', which has directory 'avatars' and then creates a folder named with uid storing the two sizes of images used.

    Basically check to make sure the URL paths are leading to the right places with your install of WordPress. The program is working fine for me and many other users, so it's either your permissions or directory structure that may be causing problems.

    Please post back here if you figure out what it is!

    Sorry I can't be of more help and I will try to find some time to look into it.

    Good luck,
    ctltdev

  5. cperugino
    Member
    Posted 1 year ago #

    Hi! Thanks for the detailed info. I seem to have a problem on the server side. The uploads directory is 777 but not the avatar under it. It refuses to stay at 777. I contacted support to see if they can set it at 777.

    Thanks!

  6. a.luiz.n
    Member
    Posted 1 year ago #

    I got the same issue and the message "Sorry, No file available"
    i'm running in localhost and yes i have a uploads folder inside wp-content folder...

  7. sgagan
    Member
    Posted 1 year ago #

    Hi a.luiz.n,

    Your issue is a bit different than the previous posters, but similar in a sense. The code behind your error is:

    if( !file_exists($_POST['attachment_file']) ) {
    		echo "<div class='error'><p>Sorry, No file available</p></div>";

    and..

    <input type="hidden" name="attachment_file" id="attachment_file" value="<?php echo esc_url($file); ?>" />

    For some reason, your file from your disk is not getting read and therefore this error is spit out later in the code because it didn't POST the image URL on your disk earlier. More than likely, this is a permission error, similar to the previous posters and I would suggest that you set the folder where your image is stored to 777 making them accessible for the plugin to use.

    Hope this helps!

    Also, TO ALL POSTERS HERE, I will be releasing a new updated version of user-avatar...possibly today! I have gotten lots of feedback and hope that you guys like the new functionality!

    Cheers,
    Gagan.

  8. ambro23
    Member
    Posted 1 year ago #

    Hi sgagan!

    I've upgraded from user avatar v0.5 to v1.5.
    It did not work for me until I've changed:

    line 486 in user-avatar.php
    from
    $avatar_folder_dir = USER_AVATAR_UPLOAD_PATH."{$user}/";
    to
    $avatar_folder_dir = USER_AVATAR_UPLOAD_PATH."{$id}/";

  9. ambro23
    Member
    Posted 1 year ago #

    Sorry, the modified line number is: 483

  10. Scott
    Member
    Posted 1 year ago #

    Installed the plugin, had no problems uploading my avatar, but when a comment is posted to my blog, I get the following:

    Catchable fatal error: Object of class stdClass could not be converted to string in /home/footb760/public_html/wp-content/plugins/user-avatar/user-avatar.php on line 483

    Along with at notice, the post can no longer be commented to, at least in my eyes. here is a link:

    http://footballingeneralonline.com/2010/08/22/welcome-to-fig-my-first-post-as-this-community-goes-live/#comment-3

    Let me know how to fiox this, as my members are anxious to upload their own avatars/profile pics.

  11. sgagan
    Member
    Posted 1 year ago #

    Thanks so much ambro23... I was in a rush to push the changes because it was my last full day at work and I overlooked changing that back in my frantic day! I will push the change to this SVN on Thursday and will relay your message to other users.

    Scott try ambro23's fix, otherwise, I will update on Thursday.

    Sorry for any inconvenience,

    Gagan.

  12. baszer
    Member
    Posted 1 year ago #

    hi sgagan,

    i just tried your update, but i still have the same problem. :(

    (everything goes well, but after the cropping it says:
    Here's your new profile picture...
    but then no picture is showed)

    the permissions are set right but i dont know what to do next.

    hope you have the solution

    with regards,
    bas

  13. Affenkind
    Member
    Posted 1 year ago #

    baszer and cperugino: same Problem here!
    after upload and crop, no Picture, only a white left/right stripe.

    have found the Problem, but i am to lame to fix it in the .php code from sgagan, hope the Author have time for us to make us happy.

    The Problem are the Directory- and File Permissions of the uploads,
    the Plugin not use:

    define( 'FS_CHMOD_DIR', 0755 );
    define( 'FS_CHMOD_FILE', 0644 );

    from wp-config.php and write the Directory and Files with default FTP Permissions from the Server, my server writes by default the directory with 2750 and the files with 640 Permissions, and that ist not readable for the Plugin after upload.

    for testing: upload your Avatar and then go to the ftp server and set the directorys under uploads to 755 and all the files under uploads to 644, then this great Plugin works fine, but this way are a lame way, the Author "must" fix it ... please!!

  14. baszer
    Member
    Posted 1 year ago #

    hi all, i have got the solution! (for my problem)

    maybe its helpfull to somebody else.

    First i did not want avatars at all, so i turned the checkbox "do not show avatars" on. I totally forgot, and then i installed your avatar-plugin.

    So people, turn it on!! :)

    thank you for your reply.

    Bas

  15. mikemcd22
    Member
    Posted 1 year ago #

    @affenkind
    Thanks for this fix. I had to change the directory and all the files to 755. I suspect this may be a security loop hole of some sort but I am not an expert. I hope my site is safe. BTW, there is a director under "Avatars" named "2". I have this working with:

    Theme my Login
    Theme my Profile
    Gravatar for WP
    People lists
    User Avatar (duh)

    Mike

  16. mikemcd22
    Member
    Posted 1 year ago #

    Update to post: I now have the problem that new users (default Subscribers) don't seem to have permission to upload a picture. They get redirected to their profile page. Any hints for a hack?

  17. mikemcd22
    Member
    Posted 1 year ago #

    Sorry to keep posting to my own post but I am desperate for a fix to my issue; the issue is that no one below the role of Editor can upload their picture and I do not wish to grant editorial rights to subscribers.

    I suspect the correction might be made here:

    if(($profile->ID == $current_user->ID || is_super_admin($current_user->ID)))

    Any suggestions?

  18. Yetisan
    Member
    Posted 1 year ago #

    Im having a problem with making a crop. It does upload the original picture to my server, but when i press the crop image I get the error saying "Sorry, No file available"

    The orginal image gets uploaded to wp-content/uploads/2010/10 and the wp-content/uploads/avatars is created
    trying to set folders or files to 777 with ftp only it gives me the error: "504 Command not implemented for that parameter". Yes its a windows server.
    I turn read only of, but as soon as i apply it, its back there.
    What am i doing wrong

  19. jraycv
    Member
    Posted 1 year ago #

    Hi! I'm just new on wordpress I'm using zymichost.com
    when I crop the picture it tells me this errors'...

    can somebody help me on this thanx...

    Warning: imagejpeg() [function.imagejpeg]: SAFE MODE Restriction in effect. The script whose uid is 311288 is not allowed to access /www/zymichost.com/t/e/s/testme/htdocs/wp-content/uploads/avatars/1 owned by uid 2001 in /www/zymichost.com/t/e/s/testme/htdocs/wp-admin/includes/image.php on line 74

    Warning: imagejpeg() [function.imagejpeg]: Invalid filename in /www/zymichost.com/t/e/s/testme/htdocs/wp-admin/includes/image.php on line 74

    Warning: imagejpeg() [function.imagejpeg]: SAFE MODE Restriction in effect. The script whose uid is 311288 is not allowed to access /www/zymichost.com/t/e/s/testme/htdocs/wp-content/uploads/avatars/1 owned by uid 2001 in /www/zymichost.com/t/e/s/testme/htdocs/wp-admin/includes/image.php on line 74

    Warning: imagejpeg() [function.imagejpeg]: Invalid filename in /www/zymichost.com/t/e/s/testme/htdocs/wp-admin/includes/image.php on line 74
    Here's your new profile picture...

  20. funzool
    Member
    Posted 1 year ago #

    i have the same problem. it browsed, uploaded, cropped but didn't appear.

    i manually create new sub folder uploads/avatar in wp-content and changed the permission to 777. and it works well now! thx

  21. paulatohlinecalhoun1951
    Member
    Posted 1 year ago #

    My problem is that I cannot crop my image. The "pre-cropped" image that shows up is the correct one and does not need cropping necessarily, so I can go with it, although I would like to tighten it up some. When I click on cropped and finished, all that shows up is a black square. When I originally put my new gravatar image up, What came up was an elongated image with a black bar down the side. Ever since I went back in to try and xorrect it, it has not allowed me to do anything! So I have switched back to the older image I had, which I also cannot crop. Trying to resize the box, or even move the area up and down just gives me a pop up ΓΈ sign. What can I do? Gravatar gave me a support e-mail address, but that address is invalid. It is: support@gravatar.com

  22. Harleyman
    Member
    Posted 1 year ago #

    The plugin works fine. No problems at all, however we will not be using it. There is no way to set the size of the finished image desired, and these are too large for our liking.

    Please add a resizing option. Thank you for your time.

  23. lekandu
    Member
    Posted 1 year ago #

    I found the issue causing the message "Sorry, Image not available" after cropping to be to do with a site hosted on a windows server. For some reason the wordpress sanitising code esc_url returns an empty string with windows IIS. Hence the form id="iframe-crop-form" has no value for the hidden input element "attachment_file" and the image gets lost (although it has actually been uploaded to the general uploads directory).
    My quick fix was to change line 280 of user-avatar.php (as of version 1.2.1)
    from
    <input type="hidden" name="attachment_file" id="attachment_file" value="<?php echo esc_url($file); ?>" />
    to
    <input type="hidden" name="attachment_file" id="attachment_file" value="<?php echo $file; ?>" />

    i'm sure there's a better solution for this but it's lunch time now and so i have other priorities. cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic