1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem with avatar upload

Discussion in 'Troubleshooting and Problems' started by Davyc, Nov 27, 2011.

  1. Davyc

    Davyc Well-Known Member

    My request is regarding the Avatar overlay. When my (non-technical) members go to add an Avatar and select the 'choose file' no image is displayed which makes them think it hasn't worked. I explained to them that they need to click 'okay' and then 'close' and then reopen the overlay again, but this just annoys them lol. Is there any chance that this can be refreshed when they upload a file so they know it's worked.

    Many thanks ;)
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Suggestion threads should be limited to a single suggestion.

    I'm fairly sure though that all of those have already been suggested, with the exception of the first one.
    I'm not sure I understand the issue though, once a file has been chosen and uploaded, the avatar is automatically refreshed.
  3. Davyc

    Davyc Well-Known Member

    I've edited the post Brogan - can you change the title to reflect the Avatar request please.

    I did a search for the others I mentioned and they are there, though the solution to the upload signatures looked good there was no add-on files or code.

    With thanks :)
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Can you explain in more detail about the avatar issue?

    What you've posted doesn't tie with the current behaviour - the overlay already automatically refreshes.
  5. Davyc

    Davyc Well-Known Member

    Not on my forum it doesn't. When you select 'choose file' and navigate to where the file is and click open nothing changes. The place holders where the Avatars appear remain blank as though no file has been chosen. If you close the overlay and then reopen it the avatar image is there. This is where it confuses the hell out of my members as they think the upload hasn't worked lol. Very few of them are technically minded so trying to explain in words what they need to do is not always successful.

    I've tried this in my default browser - Google Chrome - and in IE9 and the end results are the same. Not tried it in Firefox but will do that and see what happens.
  6. Davyc

    Davyc Well-Known Member

    OK done a retest on this - it works in Firefox, it now works (???) in IE9 but it definitely doesn't work in Chrome. I tried it with my dummy account and my own account. So anyone using Chrome will be out of the loop with this. IE9 is a bit of a funny one as it didn't work and now it does after trying it out in Firefox.

    The joys of browser incompatibilities lol.
  7. Brogan

    Brogan XenForo Moderator Staff Member

    I'll move this to trouble shooting then as that's not the default behaviour.
    If you try here on XenForo.com for example you will note that it works in all browsers.
  8. mrGTB

    mrGTB Well-Known Member

    It sounds like this might be a chmod issue. Can I ask here, when they upload an avatar and nothing is displayed. Does the avatar still show in any posts they make? If no, you have permission issues going on with avatar uploads. I had the same issue before and the only way to know if your having the same thing, upload an avatar, or your members. Then see if it gets displayed in posts made.
  9. Davyc

    Davyc Well-Known Member

    Chmods are fine and all permissions are set correctly. Avatars do still show in posts and also if the Avatar overlay is reopened after a file has been uploaded. It's just happening in Chrome where the overlay is not refreshed after the file is uploaded making it look as though the upload failed. It works fine in Firefox and IE9 (although initially it didn't work in IE9 lol). Seems that this issue is isolated to Google Chrome.

    Thanks for asking and for the input :)
  10. Brogan

    Brogan XenForo Moderator Staff Member

    Do you have a test login so I can check?
  11. Davyc

    Davyc Well-Known Member

    I've PM'd you a login so you can try it out - many thanks for the help.
  12. lasertits

    lasertits Active Member

    Anyone think this might have something to do with cache? APC? I'm running APC and this is exactly the issue I'm having with avatar uploads. :confused:
  13. Brogan

    Brogan XenForo Moderator Staff Member

    It works fine for me in Chrome.

    I can't reproduce the problem.
  14. Davyc

    Davyc Well-Known Member

    Hmmm could it be the version of Chrome I'm using - version 16.0.912.41?
  15. Brogan

    Brogan XenForo Moderator Staff Member

    So the problem is just for you?
    I understood it was for all users using Chrome based on your first post.

    Definitely sounds like a browser/local issue though.
  16. lasertits

    lasertits Active Member

    Well, I'm having the same issue and I'm using the latest version of Firefox, I've also tried Chrome, doesn't seem to matter what browser I use. Davyc has explained it already, but basically I go to upload a new avatar, it says it uploaded successfully but the overlay still shows my old avatar, and behind the overlay the site still has my old avatar. When I hit okay/close and then refresh the profile page, the new avatar appears. Sometimes I'll get lucky and the overlay will actually update but that seems to be few and far between, and even if it does, smaller thumbnails don't update immediately - again, caching issue? :confused:

    I'm going to have some others test avatar uploads on the install I have setup to ensure I'm not the only one, and if I'm not the only one, what could the issue be? As I said earlier, all I can guess is some cache issue such as APC or perhaps an issue with the pecl gd library, who knows I'm just taking shots in the dark here. Whatever it is I hope it's an easy fix such as a simple config alteration. Perhaps doing some tests with the web console will shed some light on it.
  17. Brogan

    Brogan XenForo Moderator Staff Member

    It could be cache.

    I was unable to reproduce it and tried with several different images.
  18. lasertits

    lasertits Active Member

    Alright, I set the following in my config:

    // Cache:
    $config['cache']['enabled'] = false;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions'] = array(
        'caching' => false,
        'automatic_serialization' => true,
        'lifetime' => 7200,
        'cache_id_prefix' => 'pf_'
    //$config['cache']['backend'] = 'Apc';
    $config['cache']['cacheSessions'] = false;
    Set a few of the cache options to false and commented out the APC backend cache. Upon doing so, the overlay / avatars update every time without issue. Every single avatar too, big and small.

    So it definitely appears to be a caching issue of some sort, only question now is how do we fix it... I'll have to look into this some more, perhaps put my GoogleFu into play.

    Edit: I re-enabled APC by uncommenting it but left the other 3 cache options set to FALSE. Upon trying again, avatars ceased to update. Not sure if this means APC is the culprit and not Xen's cache, or if they both have something to do with it. I'm gonna try some more tests.

    Edit2: With APC off and the $config['cache']['enabled'] option set to TRUE, avatars cease to update. Seems to be any caching in general. Avatars seem to only work if all caching is disabled. Even if the main cache enabled option is set to FALSE, yet $config['cache']['cacheSessions'] = true; - then avatars will cease to update upon upload.
  19. Mike

    Mike XenForo Developer Staff Member

    That's ultimately not the issue then -- as cacheSessions does nothing without the cache itself being enabled.
  20. Davyc

    Davyc Well-Known Member

    I've got it working in IE9 and Firefox, but still no go in Chrome.

Share This Page