WordPress.org

Ready to get started?Download WordPress

Forums

Buddypress Xprofile Custom Fields Type
Image upload o.k on edit profile but not on registration (7 posts)

  1. ElMuchacho
    Member
    Posted 8 months ago #

    Hi,

    Really like the plugin but I'm having a slight problem. . .

    I am using an image field in the registration page for the avatar and using the code from a different thread which allows uploaded images to be used as avatars.

    Thread here . . .

    http://wordpress.org/support/topic/avatar-image-1?replies=14

    Problem is the registration works fine but the image does not appear on the profile after registration.

    Once the user is registered and I try to upload the image again (edit profile page), it displays no problem.

    The file path for the 'missing registration' image is not getting wrote to the server at registration, even though the profile folder has 0755 permissions but after registration (edit profile) the image is getting uploaded and saved to the server with the exact same file path as the 'missing registration' image.

    I am using a custom theme so I changed the theme to the BP default theme. Disabled all plugins except your plugin, Buddypress 1.8.1 and I'm using WordPress 3.7.1 . . . still no good. The image just isn't displaying after been added at registration so it isn't a problem with my theme or any plugins that I know of.

    Any ideas?

    Could it be a problem with the use image as Avatar code?

    Many thanks

    http://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/

  2. ElMuchacho
    Member
    Posted 8 months ago #

    Hi,

    To add to my previous point. I've added extra image fields to the registration form and the user profile, these also aren't showing after been uploaded at registration. But like the Avatar are fine if uploaded from the edit profile screen after the user has confirmed registration and logged in, so it isn't the Avatar code.

  3. donmik
    Member
    Plugin Author

    Posted 8 months ago #

    Hi,

    In my test site, this is working so it's difficult to debug without seeing code. You can do this checks:

    - First, try to change the permissions of your uploads folder to 0777.
    - In my plugin, the function responsible of copying the image to your uploads folder is "bxcft_signup_user". Search this code "copy($uploaded_file['file'], $destino);" and below it write this:

    var_dump($uploaded_file); var_dump($destino); die();

    This code will stop the execution when uploading the image and copying to your folder. The first var_dump will show what file it is going to upload. The second var_dump ($destino) will show the destination of the file.
    When you click on register, it must stop the execution and show this var_dump. If not, it is not doing this function, so maybe you are missing the hook of signup.

    Try this and come back with the results.

  4. ElMuchacho
    Member
    Posted 8 months ago #

    Hi,

    Thanks for the reply and I really appreciate you taking time to help me out. It's great.

    I've tried the checks and got the following . . .

    Changed uploads and all sub directories to 0777 then tried registering again. No change . . .the image was still not displaying.

    Then I added the code you wrote to the place you mentioned in the plugin and got the following error after clicking register (the user was still registered but no image)

    array(3) { ["file"]=> string(94) "/customers/c/0/1/website.com/httpd.www/wp-content/uploads/profiles/0/image.jpg" ["url"]=> string(78) "http://www.website.com/wp-content/uploads/profiles/0/image.jpg" ["type"]=> string(10) "image/jpeg" } string(96) "/customers/c/57/1/website.com/httpd.www/wp-content/uploads/profiles/57/image.jpg"

    I've replaced my site with website.com but the paths are the same.

    httpd.www . . . . Is that the problem? Should go to my URL?

    Once again many thanks for taking the time to reply.

  5. ElMuchacho
    Member
    Posted 8 months ago #

    Still no luck with this. Anyone any ideas/had the same problem?

  6. donmik
    Member
    Plugin Author

    Posted 8 months ago #

    Hi,

    It's really difficult to debug this because every web is different.

    "/customers/c/0/1/website.com/httpd.www/" This part is the absolute path to your website. Inside this last folder there must be located the wordpress folders and files.

    Check in your server if this path is created /wp-content/uploads/profiles/57/image.jpg. My plugin will create 57 folder inside profiles folder and copy the image.jpg.

  7. ElMuchacho
    Member
    Posted 7 months ago #

    Hi,

    Thanks for the reply. I'll check it to and get back to you.

Reply

You must log in to post.

About this Plugin

About this Topic