Bug #15013

shortcut icon syntax incorrect/incomplete

Added by miikaawaadizi almost 16 years ago. Updated almost 11 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


page.shortcutIcon adds this to the page:

<link rel="SHORTCUT ICON" href="(whatever path was set in the template)" />

there's twi relative links required to catch all the browsers/platforms that might be used, for some really dumb reason ... even though Micro$queak's web page (http://www.microsoft.com/technet/prodtechnol/ie/support/tipsauth.mspx) states to use the above syntax, MSIE seems to not always like it (whilst Firefox does).

the fix is to edit tslib/class.tslib_pagegen.php (syntax confirmed from http://www.winterdrache.de/freeware/png2ico/favicon.html).

this will make MSIE find the favicon and use it in bookmarks.

find (around line 448)

<link rel="SHORTCUT ICON" href="'.htmlspecialchars($ss).'" />';

replace with

<link rel="icon" href="'.htmlspecialchars($ss).'" type="image/x-icon" /><br />
<link rel="shortcut icon" href="'.htmlspecialchars($ss).'" type="image/x-icon" />';
(issue imported from #M1537)


1537.diff (1.61 KB) 1537.diff Administrator Admin, 2007-05-19 16:42
bug_1537_v2.diff (1.1 KB) bug_1537_v2.diff Administrator Admin, 2008-04-04 00:04

Related issues

Related to TYPO3 Core - Bug #20153: shortcut icon type detection does not work if allow_url_fopen is disabledClosed2009-03-10

Precedes TYPO3 Core - Bug #69665: Rendering of TypoScript shortcutIcon does not consider HTTPS (in some cases)ClosedStephan GroƟberndt2015-09-11


Updated by Matthew over 15 years ago

I am looking at another very related shortcut icon issue.

Search engines are indexing links to this shortcut icon location as a relative link from the path. So an example. Using realurl and a 'path' of www.site.com/page1/fileadmin/favicon.ico This is clearly wrong and the fix is to define the shortcuticon as forward slash fileadmin or /fileadmin/shortcuticon.ico forcing the path to start from the domain root.

However TYPO3 just ignores this and fails to put any path at all into the html code.

base href is a workaround but I think TYPO3 should allow the forward slash.



Updated by Ingo Renner about 14 years ago

if you set a base url this should be solved


Updated by Ernesto Baschny about 14 years ago

Aparently IE ignores the base-href for the shortcut icon. So if you have:

<base href="http://www.domain.com/" />
<link rel="SHORTCUT ICON" href="fileadmin/favicon.ico" />

And you are in the URL:


IE will try to load the shortcut from:


So either we should be able to enter a full URL here (http:/...) or a fixed path from website root ("/..."), both of which is not possible yet in shortcutIcon.



Updated by Michael Stucki over 13 years ago

Attached is a new patch which uses finfo_file() instead of the deprecated "mime_content_type" function.

Additionally, I have chosen to prefix the icon path with the TYPO3_SITE_URL which solves the fact that MSIE ignores the base URL for the shortcut icon.


Updated by Sebastian Kurfuerst over 13 years ago


Also available in: Atom PDF