[TYPO3-dev] stdWrap hooks - problem in 4.5
Maximilian Kalus
info at auxnet.de
Mon Feb 7 17:42:02 CET 2011
I can also copy the problems of Marcus. Having studied the code in
class.tslib_content.php, I am not quite sure how "new" hooks are
supposed to work.
The method Joey and Jigal described does not work, as far as I see. I
can manipulate $stdWrapOrder in the stdWrapPreProcess hook, but in line
2047, $this->$functionName is called. So just adding a function won't
work.
Well, in line 2036, there is an if that queries $conf[$functionName] ==
'stdWrapHookObject'. What is this for? Hunting for this obscure string,
I found that some of the original discussions in bugs.typo3.org
regarding "Optimize stdWrap" defined the strings in the configuration of
hooks arount line 1974:
foreach ($this->stdWrapHookObjects as $hookObject) {
if (is_callable(array($hookObject, 'stdWrapPreProcess'))) {
$conf['stdWrapPreProcess'] = 'stdWrapHookObject';
}
;
if (is_callable(array($hookObject, 'stdWrapOverride'))) {
$conf['stdWrapOverride'] = 'stdWrapHookObject';
}
;
if (is_callable(array($hookObject, 'stdWrapProcess'))) {
$conf['stdWrapProcess'] = 'stdWrapHookObject';
}
;
if (is_callable(array($hookObject, 'stdWrapPostProcess'))) {
$conf['stdWrapPostProcess'] = 'stdWrapHookObject';
}
;
}
In the 4.5.0 release, the are assigned the value 1 instead of
'stdWrapHookObject' in each of the four lines. Having not followed the
development, I guess there is a good reason for this.But if I change the
1 to 'stdWrapHookObject', my hooks start working again, because line
2037 assigns $singleConf correctly again.
Is this a bug or a feature, I have not grasped correctly yet?
Best regards,
Max.
More information about the TYPO3-dev
mailing list