[TYPO3-dev] typoLink() does not behave in 4.3 as it did in 4.2

Xavier Perseguers typo3 at perseguers.ch
Fri Jul 17 09:43:57 CEST 2009


Hi,

>>> link.typolink.userFunc does not work anymore (is not called at all, 
>>> class tx_mllinks_pi1 not found) while the postUserFunc still works 
>>> (code above not implicated).
>>
>> Maybe because autoloading is assumed?
> 
> I guess so but I'll have to investigate more tomorrow because this 
> causes (at least) all extensions that further process links to break 
> (even the TS code we find in core for further processing links should 
> logically break as sample is same as what ml_links uses).

After digging into tslib_content's code, I fixed problem with 
EXT:ml_links but there is definitively a change of behaviour in 4.3.

In 4.2 if somebody wanted to use a userFunc on a typolink, he had to 
write following TS (which BTW is documented on many websites and in 
official documentation [1]):

tt_content.text.20.parseFunc.tags.link.typolink.userFunc = 
tx_mllinks_pi1->getFiletype

In 4.3, there must be some problem with autoloading as one has to 
explicitly define the library to be included:

tt_content.text.20.parseFunc.tags.link.typolink.userFunc = 
tx_mllinks_pi1->getFiletype
tt_content.text.20.parseFunc.tags.link.typolink.userFunc.includeLibs = 
EXT:ml_links/pi1/class.tx_mllinks_pi1.php

However, when defining postUserFunc, e.g., :

tt_content.text.20.parseFunc.tags.link.postUserFunc = tx_mllinks_pi1->main

it works without having to manually define the includeLibs, just as in 
4.2. Note that this worked even before I manually added the includeLibs 
to make typolink.userFunc work.

[1] 
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/5/8/

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away




More information about the TYPO3-dev mailing list