Bug #15013
closedshortcut icon syntax incorrect/incomplete
0%
Description
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)
Files
Updated by Matthew almost 19 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.
Matthew
Updated by Ingo Renner over 17 years ago
if you set a base url this should be solved
Updated by Ernesto Baschny over 17 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:
http://www.domain.com/de/testpage/index.html
IE will try to load the shortcut from:
http://www.domain.com/de/testpage/fileadmin/favicon.ico
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.
Cheers,
Ernesto
Updated by Michael Stucki over 16 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.