Project

General

Profile

Actions

Bug #19957

closed

linkHandler different than "record" leads to rteerror

Added by Martin Holtz over 15 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2009-02-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

class.tslib_content.php->typoLink($linktxt, $conf)
provides an hook for an linkHandler.

So an typolink like:
<link commerce:tx_commerce_products:66|tx_commerce_categories:5 -
internal-link>LinkText</link>

is valid.

But if i do it in an rte field, i get:

<span style="border: 2px solid red; background-color: yellow; color: black;"><link commerce:tx_commerce_products:66|tx_commerce_categories:5 -</p> <p>internal-link>LinkText</link></span>

Because in

typo3_src/t3lib/class.t3lib_parsehtml_proc.php->TS_links_rte($value)

there is only "record:" allowed.

Reproduce:

create text content element, disable rte and put this snippet into it:

<link commerce:tx_commerce_products:66|tx_commerce_categories:5 -
internal-link>LinkText</link>

save - everything will be fine.

Activate rte - you will see the error, deactivate the rte you get:

<span style="border: 2px solid red; background-color: yellow; color: black;"><link commerce:tx_commerce_products:66|tx_commerce_categories:5 -</p> <p>internal-link>LinkText</link></span>

You do not need to install an Extension or select something from the RTE do prove that.

(issue imported from #M10331)


Files

10331.diff (939 Bytes) 10331.diff Administrator Admin, 2009-02-03 10:52
T3X_linkhandler-0_2_1-z-200902031052.t3x (97.3 KB) T3X_linkhandler-0_2_1-z-200902031052.t3x Administrator Admin, 2009-02-03 10:52
0010331_v3.patch (939 Bytes) 0010331_v3.patch Administrator Admin, 2009-04-08 12:56
T3X_testlinkhandler-0_0_0-z-200904281745.t3x (3.34 KB) T3X_testlinkhandler-0_0_0-z-200904281745.t3x Administrator Admin, 2009-04-28 17:45

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #20294: Integrate possibility to validate custom links for RTEhtmlare disposalClosedOliver Hader2009-04-08

Actions
Has duplicate TYPO3 Core - Bug #20314: Links with registered keywords are not recognized by RTEClosedSteffen Kamper2009-04-15

Actions
Actions #1

Updated by Martin Holtz over 15 years ago

Patch applied

Actions #2

Updated by Martin Holtz over 15 years ago

i added an modified
T3X_linkhandler-0_2_1-z-200902031052.t3x

where i simple added an second linkhandler in
ext_localconf.php

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler']['commerce'] = 'EXT:linkhandler/class.tx_linkhandler_handler.php:&tx_linkhandler_handler';

Actions #3

Updated by Martin Holtz over 15 years ago

Test this issue:

1.) Install linkhandler extension.
2.) create content element, disable rte and put into
<link commerce:tx_commerce_products:66|tx_commerce_categories:5>LinkText</link>

3.) save content element, enable rte and save again. Disable rte again, you will get:

<span style="border: 2px solid red; background-color: yellow; color: black;"><link commerce:tx_commerce_products:66|tx_commerce_categories:5 -

internal-link>LinkText</link></span>

4.) apply patch. Do Step 1-3 you should not get the span again

5.) test than
<link somedifferent:tx_commerce_products:66|tx_commerce_categories:5>LinkText</link>

should be wrapped in Error: <span ...> again

Actions #4

Updated by Daniel Poetzinger over 15 years ago

Possibly not what you wanted to hear :-) but. You could use the "linkhandler" extension - and propably can configure a TAB "commerce" where you can link to the products?

Actions #5

Updated by Sascha Egerer about 15 years ago

@ Daniel

in commerce there is a CategoryTree with the products. This is why there is a own "linkhandler" added.
It would be cool if this patch would be added to core

Actions #6

Updated by Martin Holtz about 15 years ago

@Daniel Hinderink: yep, thats not what i want to hear.

The question for me is not, if your extension "linkhandler" works or not, but since such an link definition is valid:

<link commerce:tx_commerce_products:66|tx_commerce_categories:5 -
internal-link>LinkText</link>

It should be possible to use it in RTE without getting an ugly and wrong! warning around it.

So in my eyes there are two solutions:

disallow different custom links like <link commerce

or if they are allowed, it should be possible to render them in RTE (there is a solution... so why not?)

but what we have now is a half solution

Actions #7

Updated by Martin Holtz about 15 years ago

its the same as #20314

Actions #8

Updated by Martin Holtz about 15 years ago

hi,

i added an test-extension "testlinkhandler"

it will register an linkhandler for <link test:10>test</link>

Test like this:

1) create text element - disable RTE
2) insert
<link test:1>Link to page 1</link>
<link unknownlinkhandler:1>This will be marked as error</link>
3) save
4) enable RTE

Only "This will be marked as error" should be market as an error.

Actions #9

Updated by Oliver Hader about 15 years ago

Committed to SVN Trunk (rev. 5370)

Actions

Also available in: Atom PDF