[TYPO3-core] RFC #13487: bugfix: no alternative icon returned from 'getIcon' in class.t3lib_iconworks.php (backend-redesign)

Stephan N Kellermayr stephan.kellermayr at t3x.at
Sun Apr 4 23:22:25 CEST 2010


hello Susanne,

i am sorry, but i think its not so easy to test, because if you do not 
use an extension which adds new icons (or even new icon-states), you 
will not see any "bug".

i think the easiest way is:
install t3xskin and use the patch i have added here as attachement.
its the same modification which you can find as patch-file provided by 
t3xskin, but i kept the concerning line from source.

if you then edit a normal page and activate checkbox 'Hide Page' AND 
'Hide in Menu' you should see that the generated filename is something 
like 'pages__hn.gif'.
this filename has added an additional state at the and, the 
'n'-appendix, and this file does not exist as image in the source.

the result is, that the shown file is a temporary generated image with a 
red 'X' on it, or, if you have activated the option 
$TYPO3_CONF_VARS['GFX']['noIconProc'] in localconf.php, an icon with a 
red questionmark and the filename 'pages__x.gif'.

and thats the point of this issue: if an extension provides icons which 
are not available in the source (and remember: the default iconset is 
NOT complete), the alternative icon will not be visible, because the 
alternative path is never checked.


best regards, Stephan

PS: please note that the added patch contains another reported bugfixes 
pending in core list:
wrong icon-state returned from 'getIcon' in class.t3lib_iconworks.php:
http://bugs.typo3.org/view.php?id=13486

...btw: do you know another solution than a hardcoded patch in this case?


Susanne Moog schrieb:
> Hi,
> 
> On 11.03.2010 11:55, Stephan N Kellermayr wrote:
>> this is an SVN patch request.
>>
>> problem:
>> the function 'getIcon' in 't3lib/class.t3lib_iconworks.php' checks if an
>> icon with the current states (hidden/timing/futuretiming/protected...)
>> is available and returns this.
>> but if we are using an extension which overrides some icons AND provides
>> additional icons which are NOT available in the source (i.e.: for some
>> states which would be normally displayed with 'icon_not_found.gif' or
>> the appendix '*__x.gif') it does not return the alternative icon,
>> because there is no check to the alternative path given by
>> $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['absDir'] which is used by some
>> skin-extension (ie t3skin or t3xskin).
>> in fact there is no possibility to improve the backend with replacements
>> for missing icons at this time.
>>
>> solution:
>> just add an additional filecheck in function 'getIcon'....that would be
>> fine for backend-redesigner and other people who wants to improve the
>> default icon-set.
>> (patch attached: t3lib/class.t3lib_iconworks.php.0013487.diff)
> 
> do you have an example for a missing icon that is replaced by your skin
> extension so that it's easy for me to test this?
> 
> Best regards,
> 
> Susanne

-------------- next part --------------
A non-text attachment was scrubbed...
Name: class.t3lib_iconworks.php.diff
Type: text/x-patch
Size: 2333 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100404/ffdcd829/attachment.bin>


More information about the TYPO3-team-core mailing list