Bug #20221
closedIcon path calculated incorrectly in t3lib_tceforms->getIcon()
0%
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