Project

General

Profile

Actions

Bug #15013

closed

shortcut icon syntax incorrect/incomplete

Added by miikaawaadizi about 19 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2005-10-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

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 2 (0 open2 closed)

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

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

Actions
Actions #1

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

Actions #2

Updated by Ingo Renner over 17 years ago

if you set a base url this should be solved

Actions #3

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/&quot; />
<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

Actions #4

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.

Actions #5

Updated by Sebastian Kurfuerst over 16 years ago

committed.

Actions

Also available in: Atom PDF