Home Forums Plugin Support WP User Frontend Pro Avatar Images Break on Multisite

This topic is: resolved

This topic contains 11 replies, has 2 voices, and was last updated by  Mike 5 years, 10 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2631

    Mike
    Participant
    Post count: 26

    Hi

    It's me again with multisite issue lol..still loving this plugin though ! The issue now is that when uploading an avatar on a user profile on the main site, the avatar doesn't carry over to their profile on their own site in the network. All other info carries over just fine but the avatar image is broken on subsites.

    I was using Simple Local Avatar which worked perfect and it automatically showed up on frontend profiles when using the free version. However, it doesn't show up on the profile of the PRO version because I can't figure out the action hook thingy.

    So firstly, is there a way to force the avatar to show up on sub sites in the network as well? Or , is there a way to get “Simple local avatar” plugin to show up on the user profile in the front end? Thanks!

     

    Mike

    #2632

    Mike
    Participant
    Post count: 26

    Actually even trying to re-upload the avatar on profile in a sub site doesn't work at all. Still shows broken image! 🙁

    #2639

    Tareq Hasan
    Keymaster
    Post count: 2831

    Did you activate the plugin network wide? Or per site based?

    #2648

    Mike
    Participant
    Post count: 26

    Hey

    I have it Network Activated. Should I make it activated per site? That might make sense..hmm im gonna try and let you know what happens

    #2649

    Mike
    Participant
    Post count: 26

    Dang that didnt work 🙁  When clicking select image the image shows up on the form but as soon as you click update profile it becomes a broken image 🙁

    #2670

    Tareq Hasan
    Keymaster
    Post count: 2831

    Just tested with network wide activation and also per site activation. Seems fine.

    #2715

    Mike
    Participant
    Post count: 26

    Wow I hate to hear that since that means there is something conflicting or wrong with my install 🙁  lol …thanks for checking though I guess I got to be doing some troubleshooting on my end

    #2801

    Mike
    Participant
    Post count: 26

    Hi

    I figured out the problem but I dont know how to fix it. Its the way the plugin is built because it didn't keep Multisite in mind sometimes but not blaming ya 😉

    OK, so if you upload avatar on your profile on a Sub-site in the network it works fine. However, if you navigate over to the main site in the network and view your profile from there you will see the image as broken. If you then attempt to upload from the profile on the main network it will work again. But then navigate over to the sub site and see it broken yet again. endless cycle and this is why:

    When uploading to the main site it is grabbing for the avatar in the media folder of the main site which is in the URL Like this: http://mydomain.com/wp-content/uploads/2013/04/photoname-avatar.jpg which works BUT if you navigate over to your profile on a subsite it is trying to grab the avatar image from its own media library which is evident in the URL like this http://subsite-mydomain/wp-content/uploads/sites/250/2013/04/photoname-avatar.jpg

    This is why the broken image happens because the avatar doesn't exist in that media library but instead on whatever site you uploaded the avatar to your profile from. Any ideas on how this could be fixed? Thanks so much!

    #2803

    Tareq Hasan
    Keymaster
    Post count: 2831

    The explanation makes sense. I'll see what I can do to fix the problem.

    #2804

    Mike
    Participant
    Post count: 26

    Thanks so much Tareq as always 🙂

    #2815

    Tareq Hasan
    Keymaster
    Post count: 2831

    It's a kinda big problem for multisite. If you upload a avatar from the main site, it'll upload the photo to /uploads/2013/04/ folder. But if you upload the photo a sub site, it'll upload in the sub sites upload folder.

    As the avatar path is save in user meta, there is no way to know from which site you've uploaded the photo and where should I look for it. So there is ambiguity for this situation.

    The only fix I can provide is, it'll show the avatar correctly in the current site. But it'll not show the avatar in other sites, in that case it'll fallback to gravatar instead of showing a broken image.

    #2839

    Mike
    Participant
    Post count: 26

    Hey Tareq

    Yeah I see this problem. I thought maybe it could be cuz I am using the same Profile shortcode on each of the sites but not sure if changing that would make a difference. But since I am using a plugin that creates default templates for new sites I wouldn't be able to change this anyway.

    Maybe you can help me use this plugin: http://wordpress.org/extend/plugins/simple-local-avatars/

    It actually works PERFECTLY for not only multisite but also with your WP User FrontEnd Free version! Your free version automatically grabbed this plugin into the frontend form and it was soo slick. Can you take a look and see if its possible to add this into my front end pro profile ? Thanks for any help you can provide on this..I am still loving your work

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Avatar Images Break on Multisite’ is closed to new replies.