Attachments get wrong favicon

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
General
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: smaug, Assigned: glob)

Tracking

Production

Details

(Reporter)

Description

7 years ago
Attachments like https://bug696233.bugzilla.mozilla.org/attachment.cgi?id=569646 
shows the bugzilla product logo as favicon.
https://bugzilla.mozilla.org/show_bug.cgi?id=696233 shows the normal
green+red icon.
Since attachments are served from a different domain, I think it is in the Apache configuration to fall back to the default BMO /images/favicon.ico for those domains.

In recent changes, BMO now overrides the default favicon with the BMO one as a RewriteRule but it doesn't seem that .htaccess overrides are allowed for attachment related domains.

Possibly the same RewriteRule can be added to the apache config for the attachment domains as well to make it all consistent.

justdave, ashish, can you comment on this possible reason/solution?

dkl
Assignee: nobody → dkl
Status: NEW → ASSIGNED
The attachment subdomain is the same vhost in the apache config.  The Bugzilla application itself is doing any detection of which domain it's on.

Here's all the current rewrites in the apache-level config:

        RewriteRule ^/robots.txt$ - [L]

        # Let the bug subdomains redirect to the bug instead of to the home page
        RewriteCond %{SERVER_NAME} ^bug(\d+)\.
        RewriteRule ^/$ https://bugzilla.mozilla.org/show_bug.cgi?id=%1 [R=302,L]

        RewriteCond %{QUERY_STRING} ^quicksearch=ALL%20status1.9.2%3A.7-fixed%3A.5-fixed$ [OR]
        RewriteCond %{QUERY_STRING} ^quicksearch=ALL%20status1.9.2%3A.7-fixed,.5-fixed$
        RewriteRule ^/buglist.cgi$ /FF3.6.7relnotesquery.html

        RewriteCond %{QUERY_STRING} ^field0-0-0=product%26resolution=FIXED%26classification=Components%26chfieldto=2010-11-02%26chfield=resolution%26query_format=advanced%26chfieldfrom=2010-09-13%26chfieldvalue=FIXED%26type0-0-0=anywordssubstr%26value0-0-0=Core%2C%20Firefox%2C%20NSPR%2C%20NSS%2C%20Toolkit$
        RewriteRule ^/buglist.cgi$ /FF4.0b7relnotesquery.html

        # Let a URI containing only a bug number map to a bug (see bug 376059)
        RewriteRule ^/([0-9]+)$ https://bugzilla.mozilla.org/show_bug.cgi?id=$1 [R=301,L]

        # static pages we used to link to from everywhere that are now dynamic pages
        RewriteRule ^/quicksearch\.html$ https://bugzilla.mozilla.org/page.cgi?id=quicksearch.html [R=301]
        RewriteRule ^/bugwritinghelp\.html$ https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html [R=301]

        Redirect gone /localconfig.js
Thanks justdave.

Was this working before? I cannot in my testing make the attachment display use a favicon as when displaying a test/plain patch for example, no <link> tag is given. With some research, I noticed that Firefox will try to load a favicon.ico from the document root if one is not specified but this doesn't seem to work for me either. Does Firefox only look for the favicon.ico file on certain content types such as text/html only? 

Strangely on my local test instance I get an icon when viewing an attachment that looks like a document page. All other standard Bugzilla pages show the proper shortcut icon. But on BMO, when
viewing an attachment, I get the upstream Bugzilla icon instead of the default page looking icon. 

justdave, is there anything special going on with the live servers where there is a favicon.ico 
file in the document roots added or some type of Apache config that would cause it to fall back to images/favicon.ico? Doubt the latter is true as you posted the vhost config but I thought maybe something else would come to mind.

Thanks
dkl
I don't have any text-type attachements loaded before the upgrade, but I did have an image/png loaded from before the upgrade, and it has the default globe site icon, whereas an image/png attachment loaded post-upgrade suddenly has the Bugzilla-the-project site icon.

Oh, looking back in history at attachment URLs I've loaded before the upgrade, I see

https://bugzilla.mozilla.org/attachment.cgi?id=568905 <-- bmo site icon
https://bug695631.bugzilla.mozilla.org/attachment.cgi?id=568905 <-- default globe site icon

Loading those URLs today, both now have the Bugzilla-the-project icon, because https://bugzilla.mozilla.org/favicon.ico is currently the Bugzilla-the-project icon (and, uh, served as text/plain :P )

I'd often wondered why attachments didn't seem to have the bmo site icon, so from my perspective replacing https://bugzilla.mozilla.org/favicon.ico with the bmo site icon, so that all "fallback"/non-<link>-capable bmo content would get the bmo site icon, would be a fine solution to this problem.
(Assignee)

Comment 5

7 years ago
i caused this in http://bzr.mozilla.org/bmo/4.0/revision/7906
i've already fixed this; http://bzr.mozilla.org/bmo/4.0/revision/7913
Assignee: dkl → glob
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.