Author Topic: Avatars disappear after page finishes loading.  (Read 1902 times)

0 Members and 2 Guests are viewing this topic.

Offline wildweathel

  • Werret of Portland
  • Gold Donor
  • *********
  • Posts: 1783
  • Karma: 200
  • Gender: Male
Avatars disappear after page finishes loading.
« on: January 25, 2009, 04:52:12 PM »
When pages are loading or rendering I can see the avatars on the side, and mine at the top of the page, but as soon as the page loads they all disappear.  I thought this might have something to do with the 'Don't show users' avatars" setting in "Look and Layout", but setting and unsetting didn't have any effect. 

My avatar does show up on the "Forum Profile Information" page, but only at the avatar selection option; it loads then hides in the top-left corner.


Update: I logged out and saw the same load-then-hide as an anonymous user.
« Last Edit: January 25, 2009, 04:54:26 PM by wildweathel »
Kony 2012
arrest the worst


Sharing a special bond of RAFenmity with Tocade since Dec '08.

Offline goom

  • the underling of underlings
  • Administrator
  • *****
  • Posts: 8929
  • Karma: 690
  • Gender: Male
  • no other distinguishing characteristics.
    • Twitch.TV Streams
Re: Avatars disappear after page finishes loading.
« Reply #1 on: January 25, 2009, 04:53:24 PM »
i've noticed a lot of avatars disappearing, especially morf's.
is this related?

Offline Richard

  • Founder
  • Administrator
  • *****
  • Posts: 10227
  • Karma: 397
  • Gender: Male
    • Richard's Animorphs Forum
Re: Avatars disappear after page finishes loading.
« Reply #2 on: January 25, 2009, 04:54:59 PM »
This is news to me. I've had no issues with avatars. You're using Firefox?

Offline wildweathel

  • Werret of Portland
  • Gold Donor
  • *********
  • Posts: 1783
  • Karma: 200
  • Gender: Male
Re: Avatars disappear after page finishes loading.
« Reply #3 on: January 25, 2009, 04:59:11 PM »
Maybe.  This problem makes all avatars disappear, not just a single person.  Some avatars disappeared with the server move (since they weren't on the new server if I understood Richard), but that didn't affect all at once.

My best guess is that this is something wrong with the theme that's ignoring the hide-avatars setting.

Have to go now, but I'll be back this evening.


Firefox 3, no internal cache, Squid 2.6 caching proxy.  I also tried toggling the setting with Firefox connecting to the web directly, with the same results.
Kony 2012
arrest the worst


Sharing a special bond of RAFenmity with Tocade since Dec '08.

Offline Richard

  • Founder
  • Administrator
  • *****
  • Posts: 10227
  • Karma: 397
  • Gender: Male
    • Richard's Animorphs Forum
Re: Avatars disappear after page finishes loading.
« Reply #4 on: January 25, 2009, 05:15:38 PM »
Maybe.  This problem makes all avatars disappear, not just a single person.  Some avatars disappeared with the server move (since they weren't on the new server if I understood Richard), but that didn't affect all at once.
All attachments (including avatars) were moved to the new server. So if people are still NOT seeing avatars, something's really wrong.
My best guess is that this is something wrong with the theme that's ignoring the hide-avatars setting.
I tried toggling that setting. The avatars disappeared when I set the option. No problems.
i've noticed a lot of avatars disappearing, especially morf's.
is this related?
As for morf's avatar. It is located on another host... and it does disappear after loading when I view the pages in Firefox. So the problem is with http://www.azupload.com not RAF.
« Last Edit: January 25, 2009, 05:24:51 PM by Richard »

Offline wildweathel

  • Werret of Portland
  • Gold Donor
  • *********
  • Posts: 1783
  • Karma: 200
  • Gender: Male
Re: Avatars disappear after page finishes loading.
« Reply #5 on: January 25, 2009, 08:03:58 PM »
No Fix Needed: This problem is mostly due to inconsistent behavior of Firefox 3.0.5 when the memory cache is activated or deactivated.

I will now attempt to produce an example of the tall avatar bug.


Executive Summary:
Avatars disappear after loading only if I have Javascript enabled.  This effects all avatars, except for the preview in profile.  I believe this is either due to a bug in one of the theme Javascript pages or in Firefox 3.0.5.  There is another possible bug in the Javascript which would causes some avatars to have a displayed height greater than the 100 pixel maximum.

I decided to see if this is specific to my profile, so I logged out and deleted my RAF cookies. 

Opened a thread (logged out).  Avatars displayed while the page loaded, then disappeared.

Loaded Document Object Model Inspector.  Navigated to my avatar.  Noticed three attributes: "class" is set to "avatar", "width" is set to 0, "height" is set to zero.  Strange, my avatar should be 100 by 100 (and thus not trigger a resize).

Opened source.  Noticed reference to http://animorphsforum.com/forum/Themes/default/script.js .  Used wget to download a copy, read through.  Discovered possible explanation for this problem in function smf_avatarResize, and a possible related bug (or maybe not, my JS is rusty).

Disabled Javascript.  Reloaded page.  Avatars appear on loading, and remain.

Logged in.  Reloaded page.  Avatars did not appear.

Unchecked "don't show user avatars" in profile options.  Reloaded page.  Avatars appeared.

Reenabled Javascript.  Avatars disappeared after page finished loading.

Possible cause:  The Javascript for the page, in my opinion most likely smf_avatarResize in http://animorphsforum.com/forum/Themes/default/script.js , does not have the correct effect on Firefox 3.0.5 for Linux i686.  Specifically, it appears that setting the .src attribute of an Image does not cause the .width and .height attributes to be changed from their default of 0 (as the script assumes), thus executing the else block, and setting width and height to zero.

Possible additional bug: if an image is wider than 100 pixels, smf_avatarResize does not check height when deciding how much to downsize an image.  Thus an image 101x200 will scale to 100x199 .  Estelore's avatar at 154x235 will scale to 100x153.


Have done some further research on this issue.  It appears that

    [0]This is a commonly-occurring idiom in Javascript.
  • This idiom may not be standards-compliant. link
  • This idiom does not work if "the image in question does not already exist in the visitor's local cache" link
With my configuration, where Squid and the kernel--not Firefox--are responsible for caching there is no Firefox cache.

So, I'll try enabling a small memory cache and see if that changes behavior.  If that fixes it the Rule of Repair applies here, so, while I consider this a bug in the SMF template, it still works.  I'll make some noise upstream, probably in the Mozilla and Simplemachines fora and see what people think.


The avatar uploader on the profile page properly scales weird sizes.  Now attempting from an attached file... nope.  Later, then.  I'm kinda jealous of Esty's tall avvy, though.
« Last Edit: January 25, 2009, 09:27:44 PM by wildweathel »
Kony 2012
arrest the worst


Sharing a special bond of RAFenmity with Tocade since Dec '08.

Offline goom

  • the underling of underlings
  • Administrator
  • *****
  • Posts: 8929
  • Karma: 690
  • Gender: Male
  • no other distinguishing characteristics.
    • Twitch.TV Streams
Re: Avatars disappear after page finishes loading.
« Reply #6 on: January 26, 2009, 01:08:05 AM »
okay, good to know that morf's host is the problem ;)

Offline ~

  • Jr. Xtreme Member
  • ******
  • Posts: 1187
  • Karma: 108
  • Gender: Male
  • Something slow an bittersweet
Re: Avatars disappear after page finishes loading.
« Reply #7 on: January 26, 2009, 07:40:20 PM »
I was going to try to help, but guess you got it covered...

Offline morfowt

  • God
  • ********
  • Posts: 8333
  • Karma: 112
  • Gender: Male
  • this is my avatar. it's a picture of nothing...
Re: Avatars disappear after page finishes loading.
« Reply #8 on: January 26, 2009, 08:08:53 PM »
good to know the problem...better if I know how to fix it...