[TYPO3-dev] stdWrap hooks - problem in 4.5

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Feb 7 16:50:59 CET 2011


JoH asenau schrieb am 07.02.2011 10:08:
>> I'm _totally_ confused, I was trying to fix my hooks to reflect news
>> rules with no luck :/ What's more I reviewed other similar extensions
>> (even published in january 2011 (before official 4.5 publishing)) and
>> none of them is working anymore...
>>
>> Maybe somebody who was working on new hooking ways could create simple
>> example ext in ter for this job?
> 
> The problem is not the hook or the way it's implemented but Jigal
> already mentioned what could be the reason:
> 
> There's an array $stdWrapOrder in tslib_cObj which determines both which
> properties are available and in which order they are executed.
> This has been done to make it possible to replace the huge "if"
> construct with real classes and function calls.
> 
> The $conf array is intersected with this array and this way the custom
> stdWrap property you want to use is removed. So it's not enough to just
> implement the function. It has to be added to this array as well.
> You can use the stdWrapPreProcess hook to modify the array and add your
> own property to $stdWrapOrder.

In my opinion this has to be fixed to make it robust and backwards
compatible again.

In case there are hooks registered, pass the whole unaltered array of
"$conf" to these methods (stdWrap_stdWrapPreProcess, etc), instead of
the stripped down $singleConf, which is always empty.

Haven't tested it, but it looks like this when reading the code. Joey,
opinions?

Cheers,
Ernesto





More information about the TYPO3-dev mailing list