Project

General

Profile

Actions

Bug #20221

closed

Icon path calculated incorrectly in t3lib_tceforms->getIcon()

Added by Jeff Segars about 15 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2009-03-20
Due date:
% Done:

0%

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

Description

In the else case of t3lib_tceforms->getIcon(), an image path is determined using the skinning API and then its dimensions and other data are calculated. The call to getimagesize() uses an absolute path that is constructed incorrectly.

After the call to t3lib_iconWorks::skinImg(), we have an image path that is comprised of backPath + source, so its relative to the typo3/ directory. We take this value and combine it with PATH_typo3 and use that path when calling getimagesize().

This works fine as long as backPath is empty, as it is in alt_doc, db_list, and all other classes that live directly inside typo3/. As soon as there is actually a backPath value we run into problems because we've just dropped some arbitrary, relative path in the middle of an absolute path.

The solution is to clean up the path that skinImg() gives us and remove the backPath before using it in getimagesize().

The easiest way to test this is in the frontend editing mode where forms show up directly on the page, but the issue should affect anywhere that there's a backPath.

(issue imported from #M10744)


Files

10744.diff (606 Bytes) 10744.diff Administrator Admin, 2009-03-20 15:50
10744_v2.diff (606 Bytes) 10744_v2.diff Administrator Admin, 2009-05-27 22:22
Actions

Also available in: Atom PDF