Trying out Drupal 4.7 and I have a theme specific favicon which is working in both firefox and IE but I am still getting a lot of log messages of:

page not found	2006-05-03 23:27	favicon.ico not found.	Anonymous	

I found these annoying! Not sure why both FireFox and IE insist on still looking for http://example.com/favicon.ico when they are already using the rel="shortcut icon".

I thought it would be an easy task to get rid of these errors. So I went to /admin/path and added an alias to the same file that works in the shortcut icon.

Unfortunately it seems that you can only alias Drupal paths. Which is mentioned in the documentation but I was hoping the definition of "Drupal paths" extended to non-PHP files in the Drupal area.

Eventually several sites will share the same code tree so I cannot just move the favicon.ico to the root of the Drupal tree.

Any suggestions greatfully received.

Comments

pcwick’s picture

At the bottom of the theme settings (or configuration) page are some settings for the favicon, however it is called the "Shortcut Icon". Options include the ability to set a path to a custom icon. Does that help?

Global
http://example.net/admin/themes/settings/

Theme Specific
http://example.net/admin/themes/settings/themename

Darren Oh’s picture

Changing the shortcut icon setting causes the correct favicon to be used, but it takes a few minutes for the error messages to stop accumulating in the log. Why would that be? Not that it's a big deal.

Darren Oh’s picture

I found the answer. Once my browser had cached the favicon, it wasn't requesting it any more. When I turned on the private browsing feature in Safari, the error messages began accumulating again. As Lee says, it's annoying.

art@progressiveu.org’s picture

I have a site where the favicon works in Firefox, but in IE it shows the Drupal favicon. Any ideas why? Is this a problem with the theme?

I could understand if IE found no favicon at all, but where is it getting the Drupal icon from?

=======
Art Morgan
http://www.progressiveU.org

art@progressiveu.org’s picture

I got it working now. I had the favicon.ico in the custom theme directories, but there was a default Drupal one in the root directory.
=======
Art Morgan
http://www.progressiveU.org

budda’s picture

Was there any proper conclusion on how to avoid this from happening when you have multiple sites from a single Drupal install?

All the replies seem to be about adding a custom favicon.ico to a theme, not how to remove the error message from the log.

ldsandon’s picture

It looks that IE (at least IE 7) keep trace of favicons in some data structure connected to the history list, not the web cache. Clearing the cache does not help to refetch the favicon, clearing the history seems to work

LDS

Anonymous’s picture

Hi,

Here's a quick solution that worked for me after a couple of days of frustrating research.

When you change the favicon in Themes > Configure > Global Settings, make sure you do the following:

  1. Uncheck Use the default logo <<< VERY IMPORTANT <<<
  2. Clear the field Path to custom logo <<< VERY IMPORTANT <<<
  3. Populate Upload logo image with path to icon file on your computer (I used 32x32 icon size which works just fine)
  4. Save Configuration

In some cases the above steps will not work. If so, simply follow the above steps for specific theme e.g., Themes > Configure > Garland

Good luck,
malviya

collin65’s picture

Thank you for the very useful hint! For favicon 6.13 I'd suggest this small change:

Use Themes > Configure > Global Settings as you suggested, then

  1. Uncheck "Use the default shortcut icon."
  2. Clear the field "Path to custom icon:"
  3. Populate "Upload icon image:" with path to icon file on your computer (I used 16x16 icon size which works just fine)
  4. "Save Configuration"

Again many thanks!

mlncn’s picture

In Drupal 8, at least, the easiest way to tell Drupal to use that favicon.ico file in the rel shortcut icon definition is to place the favicon.ico in the root of your custom theme folder (so alongside your themename.info.yml file).

(This question still ranks high in search results for "Drupal favicon" so noting it here. As noted in other answers uploading a shortcut icon through a theme's UI should work for core and contrib themes.)

benjamin, Agaric