[TYPO3-core] RFC: Bug #10744: Icon path calculated incorrectly in t3lib_tceforms->getIcon()

Christoph Koehler christoph.koehler at gmail.com
Thu May 28 16:11:32 CEST 2009


On 5/27/09 3:23 PM, Jeff Segars wrote:
> Hey guys,
>
> This is a SVN patch request.
>
> Type: Bugfix
> Bugtracker reference: http://bugs.typo3.org/view.php?id=10744
> Branch: trunk
>
> Problem:
> 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 what is
> expected to be an absolute path.
>
> Solution:
> 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.
>
>
> Additional Notes:
> RFC #11166 resolves a fatal error that you'll run into when testing this
> patch. The patches themselves are completely unrelated but you'll need
> to apply #11166 before testing or wait for a fix to be committed before
> testing this one.
>
> Thanks,
> Jeff
>
>

+1 after reading and testing (a long time ago :) )

Christoph


More information about the TYPO3-team-core mailing list