[TYPO3-core] RFC #10331: Bug: linkHandler different than "record" leads to rteerror

Steffen Kamper info at sk-typo3.de
Mon Apr 20 22:22:08 CEST 2009


Hi Martin,

main reason: why should "record" be hardcoded in? I described why this 
was in before, but doesn't make sense.
I don't insist on my solution, the array_shift-variant is possible too. 
So a simple solution like olly did would do the job ("record" has to be 
registered too!)

elseif 
isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler'][array_shift(explode(':', 
$link_param))]))

vg Steffen

Martin Holtz schrieb:
> Hi Steffen,
> 
> i do not understand, why the patch i did is not enough.
> 
> is this statement to complexe:
> 
> [array_shift(explode(':',$link_param))]
> 
>  think, the foreach-solution you suggested is in O(N), the solution which 
> looks up in an array is in O(1)? Or i am wrong?
> 
> So, i would take the patch from olly (with the re-added "record: " check).
> 
> Can i do anything - to get it into the core? (Well i do not really want to 
> discuss foreach or array_shift, i would like to see the problem solved)
> 
> regards,
> martin
> 
>> some remarks:
>> the keyword record isn't used by core, it's used if you register a
>> linkhandler for records. Only one extension can use "records" because
>> it's unique register for one keyword. Thet reason why record is
>> hardcoded is because linkhandler extension from AOE that took this
>> keyword nut had the yellow box in RTE.
>>
>> Now it's time to find a generic solution for any registered keyword. For
>> that reason i took all keys from registered and compare with them in my
>> patch which i attached here again.
>>
>> vg Steffen
>>
>> Oliver Hader schrieb:
>>> Hi Martin,
>>>
>>> Martin Holtz schrieb:
>>>> This is an SVN patch request.
>>>>
>>>> Type: Bugfix
>>>>
>>>> Bugtracker references:
>>>> http://bugs.typo3.org/view.php?id=10331
>>>>
>>>> Branches:
>>>> TYPO3_4-3 trunk
>>>>
>>>> Problem:
>>>> We have an hook for different linkhandler. So it is possible to use
>>>> <link commerce:tx_commerce_products:66> to link to an product.
>>>> But if that link is send to the rte, it will be wrapped by an warning
>>>> span, because in TS_links_rte accepts only <link record:...>
>>>>
>>>>
>>>> Solution:
>>>> Check in
>>>> typo3_src/t3lib/class.t3lib_parsehtml_proc.php->TS_links_rte($value) for
>>>> all registered linkhandlers. If no linkhandler for "record" is
>>>> registert, we will get an error too.
>>> I've attached a modified patch that re-adds the "record:" check since it
>>> was there before - no matter if a linkhandler was defined or not.
>>>
>>> +1 on reading and testing
>>>
>>> olly
>>>
> 


More information about the TYPO3-team-core mailing list