Project

General

Profile

Actions

Bug #22079

closed

wrong image-path returned in class.t3lib_tceforms.php if TYPO3-source is symlinked (backend-redesign)

Added by Stephan Kellermayr over 14 years ago. Updated over 10 years ago.

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

0%

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

Description

If an extension is installed in 'typo3conf/ext/' and overrides BE-icons, the result of 't3lib_iconWorks::skinImg' (line:4008) is i.e. "../typo3conf/ext/myextension/icons/gfx/i/pages.gif".
thats correct, but if we use a symlinked TYPO3-source we get an incorrect path to the imagefile and so we do not get the correct image-dimensions from 'getimagesize' (line:4010)!

the result is, that dropdown-menus in backend-forms which contains icons, are not rendered correctly...icon is shown under text and text is positioned leftmost.

One possible solution is, to check if the path begins with '../' after 't3lib_iconWorks::skinImg' returned the image-path and pass the new full path to 'getimagesize'.
returned iconPath without patch is: /var/www/typo3-4.3.1/typo3/../typo3conf/ext/myextension/icons/gfx/i/pages.gif
returned iconPath with patch is: /var/www/typo3-4.3.1/typo3conf/ext/myextension/icons/gfx/i/pages.gif

it worked for me with the following modified lines:
4009,4010c4009,4014
< $iconPath = substr($selIconFile, strlen($this->backPath));
< $selIconInfo = @getimagesize(PATH_typo3 . $iconPath);
---

if (substr($selIconFile,0,3)=='../') {
$selIconInfo = @getimagesize(PATH_site.t3lib_div::resolveBackPath(substr($selIconFile,3)));
} else {
$iconPath = substr($selIconFile, strlen($this->backPath));
$selIconInfo = @getimagesize(PATH_typo3 . $iconPath);
}

(issue imported from #M13461)


Files


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #22282: t3lib_tceforms::getIcon() doesn't check getimagesize() problems with "../" in pathClosedOliver Hader2010-03-15

Actions
Actions

Also available in: Atom PDF