Attachments get wrong favicon



7 years ago
7 years ago


(Reporter: smaug, Assigned: glob)






7 years ago
Attachments like 
shows the bugzilla product logo as favicon. 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?

Assignee: nobody → dkl
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 ^/$ [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]+)$$1 [R=301,L]

        # static pages we used to link to from everywhere that are now dynamic pages
        RewriteRule ^/quicksearch\.html$ [R=301]
        RewriteRule ^/bugwritinghelp\.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.

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 <-- bmo site icon <-- default globe site icon

Loading those URLs today, both now have the Bugzilla-the-project icon, because 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 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.

Comment 5

7 years ago
i caused this in
i've already fixed this;
Assignee: dkl → glob
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.