Bug #20221

Icon path calculated incorrectly in t3lib_tceforms->getIcon()

Added by Jeff Segars over 11 years ago. Updated about 10 years ago.

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

0%

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)

10744.diff View (606 Bytes) Administrator Admin, 2009-03-20 15:50

10744_v2.diff View (606 Bytes) Administrator Admin, 2009-05-27 22:22

History

#1 Updated by Jeff Segars over 11 years ago

Added v2 patch that applies cleanly.

#2 Updated by Jeff Segars over 11 years ago

Committed to trunk in r5511.

Also available in: Atom PDF