• 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/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ElMuchacho

    (@elmuchacho)

    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.

    Plugin Author Miguel López

    (@atallos)

    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.

    Thread Starter ElMuchacho

    (@elmuchacho)

    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.

    Thread Starter ElMuchacho

    (@elmuchacho)

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

    Plugin Author Miguel López

    (@atallos)

    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.

    Thread Starter ElMuchacho

    (@elmuchacho)

    Hi,

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Image upload o.k on edit profile but not on registration’ is closed to new replies.