WordPress.org

Ready to get started?Download WordPress

Forums

Profile Pic
Profile pic wont upload in 3.2 (22 posts)

  1. Rmadsen
    Member
    Posted 3 years ago #

    Hey Guys.

    Why cant the profile pic not upload the picture ?
    When i press save, plugin says saved.
    But if a scroll down to the picture upload, the picture is empty again :(.

    Help :) ?

    http://wordpress.org/extend/plugins/profile-pic/

  2. JimFitzsimons
    Member
    Posted 3 years ago #

    I'm having the same problem. The image is not getting uploaded (the profile-pics directory remains empty... and it has all the required permissions to upload into).

  3. Rmadsen
    Member
    Posted 3 years ago #

    Any who knows what is wrong ? :)

  4. herb37
    Member
    Posted 3 years ago #

    I have asked Hannah Gray.
    If I get an answer, I will inform You.

  5. GerardoRitchey
    Member
    Posted 3 years ago #

    For some reason the $_FILES information is not being sent.

  6. GerardoRitchey
    Member
    Posted 3 years ago #

    This is not an issue with Hanna's code, at least as far as I can tell. I don't know if something got changed in the way 3.2 handles file upload forms.

    I noticed the form inside user-edit.php file in the wp-admin directory did not have enctype = "multipart/form-data' - Older versions did not either, which leads me to believe that the wordpress guys made some changes.

    I have no idea how secure this is, but if you drop this bit of code into your functions.php file, the plugin will work again.

    add_action( 'show_user_profile', 'addENCtoForm' );
    add_action( 'edit_user_profile', 'addENCtoForm' );
    
    function addENCtoForm(){ ; ?>
    <script type="text/javascript"> window.onload = function(){
    document.getElementById('your-profile').enctype = 'multipart/form-data';
    		}
    </script> <?php
        }
  7. herb37
    Member
    Posted 3 years ago #

    Thanks,
    This bit of code, added to the funktions.php, solved the problem.
    I have no idea too how secure it is.

  8. Douglas28
    Member
    Posted 2 years ago #

    This fixed it for me! Thanks!

  9. Rmadsen
    Member
    Posted 2 years ago #

    It is working :)

  10. logesh
    Member
    Posted 2 years ago #

    Hi its working for me too, but in comments, the image appears broken..I have installed bbpress forum.Same case there..please help me out

  11. GerardoRitchey
    Member
    Posted 2 years ago #

    Check your paths inside of the setup section of the plugin. I had the same problem too because I had a funky install. I changed by path's and it started working.

  12. UULosAlamos Webmaster
    Member
    Posted 2 years ago #

    Sorry but which functions.php file?

  13. Nigel Lew
    Member
    Posted 2 years ago #

    I get a call to undefined function when I add this code. Can you be a bit more specific please.

    thanks,
    Nigel

  14. GerardoRitchey
    Member
    Posted 2 years ago #

    It works perfectly fine for me, and the other two people.

    Can you post the contents of your functions.php file?

  15. karingrech
    Member
    Posted 2 years ago #

    I tried out this code in my functions.php file and cause a parse error - so my question as a relative newbie to all things WP is, where exactly shall I drop this code? Can I put it at the very end of the whole file or does is still have to be contained in any other brackets?

    Any help is very much appreciated.
    Thanks,
    Karin

  16. GerardoRitchey
    Member
    Posted 2 years ago #

    It just needs to be inside of the functions.php file, but make sure you put it before the closing

    ?>

    tag

  17. Valee
    Member
    Posted 2 years ago #

    Thanks a lot. It is working fine for my code.

    Regards,
    Valee

  18. kmlynch
    Member
    Posted 2 years ago #

    I cannot get this fix to work. I've entered the code into my functions.php file, before the ?> tag, but I still get the following error message:

    Fatal error: Call to undefined function add_action() in /home/content/l/l/u/llufmg/html/llstreetmed/wp-includes/functions.php on line 4552

    Does anyone know what I might be doing wrong?

  19. GerardoRitchey
    Member
    Posted 2 years ago #

    Hi.

    You can delete the code I pasted above.

    I wrote a plugin to fix this. I haven't had a chance to get it into the WP repository, but you can grab it here.

    http://gerardoritchey.com/wordpress-profile-pic-plugin-fix/

  20. kmlynch
    Member
    Posted 2 years ago #

    Thanks a bunch for forwarding me onto the fix. Unfortunately, I've uploaded it into my plugins & activated it, but the profile picture still isn't saving. WordPress just hates me.

  21. GerardoRitchey
    Member
    Posted 2 years ago #

    You must have some other plugin interfering

  22. CGChris
    Member
    Posted 2 years ago #

    IMPORTANT:

    MAKE SURE that the added code to functions.php is correct, otherwise it will render the entire website (including the admin dashboard) unusable and you will have to fix this via FTP.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic