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 almost 15 years ago. Updated about 11 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 #1

Updated by Stephan Kellermayr over 14 years ago

updated patch! (thanks to Steffen Gebert)

Actions #2

Updated by Stephan Kellermayr over 14 years ago

if have found an already reported bug, which might be related to this: http://bugs.typo3.org/view.php?id=13819

it is marked as "closed" ...but i think it should be opened again.

the error still occurs on my production-system (running PHP v5.2.0-8~bpo.2, safe_mod=on), but not on my local system (PHP v5.2.6-3ubuntu4.5, safe_mod=off), both running TYPO3 v4.3.2.

so we should use:
$selIconInfo = @getimagesize(t3lib_div::resolveBackPath(PATH_typo3 . $selIconFile));

...instead of:
$iconPath = substr($selIconFile, strlen($this->backPath));
$selIconInfo = @getimagesize(PATH_typo3 . $iconPath);

Actions #3

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #4

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback for over 90 days.

Actions

Also available in: Atom PDF