#22079wrong image-path returned in class.t3lib_tceforms.php if TYPO3-source is symlinked (backend-redesign)
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);getimagesize(PATH_site.t3lib_div::resolveBackPath(substr($selIconFile,3)));
---
> if (substr($selIconFile,0,3)=='../') {
> $selIconInfo =
> } else {
> $iconPath = substr($selIconFile, strlen($this->backPath));
> $selIconInfo = @getimagesize(PATH_typo3 . $iconPath);
> }
(issue imported from #M13461)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.