This topic was marked solved by Nao, on May 15th, 2013, 02:56 PM
Wireless Theme Image Bug

ziycon

  • Posts: 126
Wireless Theme Image Bug
« on April 22nd, 2013, 10:36 AM »
On the wireless theme there is a broken image icon showing up on mobile devices relating to the empty image tag below that has the classes 'opaque' and 'avatar' associated to it. The broken image icon doesn't show up on any browsers I've used on the PC.

Code: [Select]
<section>
<header class="title">
<span class="greeting">Hello, <span>ziycon</span>!</span>
</header>
<div id="userbox">
<img src="" class="opaque avatar">
<ul>
<li><a href="/do/unread/">Unread posts</a></li>
<li><a href="/do/unreadreplies/">Unread replies</a></li>
</ul>
<p class="now">April 22nd, 2013, 09:31 AM</p>
</div>
</section>

Code: [Select]
#userbox img.avatar {
    float: right;
    margin: 0 0.2em 0 1em;
    max-width: 70px;
    padding: 0;
}
img.opaque {
    border-radius: 6px 6px 6px 6px;
    box-shadow: 1px 1px 3px #776666;
}
APRAI - Custom Theme - SMF 2.0.5


icari

  • Posts: 88
Re: Wireless Theme Image Bug
« Reply #1, on April 22nd, 2013, 11:59 AM »
that seems to show on the normal templates for anyone that does not have an avatar defined

well at least it is showing here on opera, have not tested other browsers

ziycon

  • Posts: 126
Re: Wireless Theme Image Bug
« Reply #2, on April 22nd, 2013, 12:06 PM »
Your correct in what your saying, firefox handles empty image tags nicely whereas most other browsers don't.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Wireless Theme Image Bug
« Reply #3, on April 22nd, 2013, 12:08 PM »
Bug introduced a few months ago? Thanks for spotting it, I never use Wedge avatar-less.

BTW, I prefer for browsers to clearly show a broken icon when an img isn't found. A la IE.

ziycon

  • Posts: 126
Re: Wireless Theme Image Bug
« Reply #4, on April 22nd, 2013, 12:13 PM »
It's unfortunatily the way FF has always been. Its only a display bug so nothing to scream about :)

icari

  • Posts: 88
Re: Wireless Theme Image Bug
« Reply #5, on April 22nd, 2013, 01:00 PM »
this has been here for as long as i can remember, not a few months

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Wireless Theme Image Bug
« Reply #6, on April 22nd, 2013, 01:53 PM »
Quote from icari on April 22nd, 2013, 01:00 PM
this has been here for as long as i can remember, not a few months
Impossible... The earlier avatar code was based on SMF's, while my system class rewrite merged together $user_info['avatar'] and $context['user']['avatar'], into what is now we::$user['avatar']... However, when I did the merging, I didn't think of rewriting the lines that said !empty(we::$user['avatar']) -- because $context['user']['avatar'] COULD be entirely empty, but $user_info['avatar'] never was, so the line wouldn't work... At all! All I did to fix it, was to check for ['avatar']['image'] being empty, instead.

icari

  • Posts: 88
Re: Wireless Theme Image Bug
« Reply #7, on April 22nd, 2013, 02:08 PM »
well i know it has been there more then a few months, i just never reported it until a few weeks ago to arantor via pm.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Wireless Theme Image Bug
« Reply #8, on April 22nd, 2013, 09:22 PM »
That's odd...

Also, reporting bugs by PM: that's silly... At the very least, as I'm the de facto frontend director at Wedge, layout/visual bugs should be reported to me, not to Pete... ;)
This shouldn't be a reason to PM me, though... Reports are to be posted on the Bug Reports board, and nowhere else.

icari

  • Posts: 88
Re: Wireless Theme Image Bug
« Reply #9, on April 22nd, 2013, 09:29 PM »
i was not reporting it to him as a bug i was asking him about it. i just never got around to making a topic for it.