Bug #20221

Icon path calculated incorrectly in t3lib_tceforms->getIcon()

Added by Jeff Segars over 12 years ago. Updated almost 11 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


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 (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

Updated by Jeff Segars about 12 years ago

Added v2 patch that applies cleanly.


Updated by Jeff Segars about 12 years ago

Committed to trunk in r5511.

Also available in: Atom PDF