Project

General

Profile

Actions

Bug #23263

closed

page.shortcutIcon does not create favicon on root Level

Added by Lina Wolf almost 14 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2010-07-25
Due date:
% Done:

0%

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

Description

If I set
page.shortcutIcon = favicon.ico
I would expect to receive a link to the favicon on root level like this one:
<link rel="shortcut icon" href="http://example.com/favicon.ico&quot; />
But there is no output.

This is due to the fact that the function getFileName from class.t3lib_tstemplate.php is beeing used.

Even though all modern Browsers can handle favIcons under a different path but the roort path there are some systems witch will first look at example.com/favicon.ico and only if they don't find it there under the path specified in the link tag.

An easy solution to this would be to ecpecially look for the string favicon.ico in class.tslib_pagegen.php line 491. A better solution would be to change getFileName from class.t3lib_tstemplate.php in a way that it can handle files on the root directory.

(issue imported from #M15226)


Files

15226.diff (3.24 KB) 15226.diff Administrator Admin, 2010-07-25 21:35
Actions #1

Updated by Susanne Moog almost 14 years ago

Please try the attached patch. You have to add the root directory (/) to the allowed paths in the Install Tool (> All Configuration > allowedPaths).

This patch is not completed, it's just a proof of concept. If it works, the error and log messages have to be redone, as they don't match at all currently.

Actions #2

Updated by Mathias Schreiber almost 14 years ago

Not sure if allowing root dir access brings up a whole bunch of other problems (security related).
Personally, I highly dislike seeing this change.

The idea is that someone without FTP or similar access can work with the system. This means "fileadmin". This is just a convention, but still... it makes sense.
If you need the favicon.ico in root, upload it there, you can't do it from the TYPO3 BE anyways.

Actions #3

Updated by Susanne Moog almost 14 years ago

The patch only allows the admin to set the root path, it doesn't allow it by default. The admin should know what he's doing... But you are right, Mattes, normally it should not be necessary and not be desired to allow the root path for everything.

Lina, as another solution you could just upload the favicon to the root and symlink it into fileadmin (or the other way round) so you can use the TYPO3 inclusion for modern browsers with the fileadmin file while older browsers ignore that tag anyway and look directly into the root folder. What do you think?

Actions #4

Updated by Bernhard Eckl over 12 years ago

Why not just setting the page.shortcutIcon to a text input, not to care about allowed paths or anything. I don’t want to set this just to make proper use of a favicon. Just let the user type what he wants there (it is just the link to the favicon and it is for admins), maybe with a check if the given file really exists.

Symlinking the file makes no sense in my opinion, then I would prefer using page.headerdata.

Actions

Also available in: Atom PDF