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.