[TYPO3-core] RFC: #8152: Icons never created when noIconProc=0 and icon is present

Helmut Hummel typo3 at jhpc.de
Fri Apr 18 22:49:34 CEST 2008


Hi Francois,

Francois Suter wrote:
> 
> Did you test your patch with the old skin by any chance? It simply 
> doesn't work. 

Well, yours do not work for me either ;)

> The error is that when you call 
> t3lib_iconWorks::makeIcon() the 5th parameter ($absfile) is still set to 
> the value of the icon without skinning. To have the skinned icon as a 
> base, $absfile must contain an absolute path calculated with the skinned 
> icon path as a base. The enclosed patch corrects this.

The problem starts earlier:

if (@is_file(dirname($absfile).'/'.$iconFileName_stateTagged))

checks, if there is a preprocessed icon, but it looks up in typo3/gfx... and not 
in the path of the skin. If we want to change it, we must start there, because 
if we leave it this way icons a processed, even if the skin has preprocessed 
icons (which is waste of resources).

> But that's not the end of the story. The path to the overlay icons is 
> actually hardcoded as $GLOBALS['BACK_PATH'].'gfx/...' in 
> t3lib_iconWorks::makeIcon(), so you get the old overlays over the new 
> icons.
> 
> To circumvent that I added a new parameter at the end of the parameter 
> list when calling t3lib_iconWorks::makeIcon(), which is an alternate 
> path to the skinned overlays. It has an empty value by default, which 
> makes it then use $GLOBALS['BACK_PATH']. So nothing is broken for all 
> other calls to t3lib_iconWorks::makeIcon().
> 
> For the call Steffen added it is then a question of guessing the path to 
> skin by extracting it from the path of the skin icon, making the 
> assumption that the overlays are in a folder called "gfx/" (which I 
> suppose they should). This works.

At least it should work this way (but does not with your enclosed patch), but

> The main question is that making such a change at RC2 is maybe too much, 
> although it can be considered a bugfix. It may be wiser to actually 
> generate manually the missing icons and included them in t3skin. 

this is the main question. As I already mentioned, I would not touch this for 
4.2 any more, because there is an easy and not dangerous way to provide the 
right icons by simply adding them to t3skin.

> Then 
> again it's a good opportunity to fix that and allow other skin makers to 
>  have proper overlays too.

I think even your patch is not enough. Please look at the function getIconImage. 
When all skinning stuff is already done in getIcon, why doing it again in 
getIconImage?

-- 
lib.salutation = TEXT
lib.salutation.value = Kind regards, Helmut
lib.salutation.lang.de = Viele Grüße, Helmut


More information about the TYPO3-team-core mailing list