Issue Bug Closed

#59302JavaScript Error with userLinks in RTE

Robert Vock 06/03/14, 10:28 updated 10/02/18, 11:56

Description

If using custom user links in the RTE, you get a JavaScript error, if you click any link with a target.

Page TS Config:

RTE.default.userLinks.10 {
    url = http://www.typo3.org
    target = _blank
    description = TYPO3 Homepage
}

Offending Line:

# typo3/sysext/rtehtmlarea/Classes/BrowseLinks.php:613
if (isset($v[$k2i . '.']['target'])) {
    $onClickEvent .= 'TYPO3\\CMS\\Recordlist\\Browser\\ElementBrowser_setTarget(\'' . $v[($k2i . '.')]['target'] . '\');';
}

The Javascript function is named browse_links_setTarget.

The feature is also badly documented:
http://docs.typo3.org/TYPO3/extensions/rtehtmlarea/Configuration/PageTsconfig/userLinks/Index.html
There is no info what userLinks are good for or how they look. For those who want to know how they look, I’ve attached a screenshot.

The Bug was introduced in 4612259a457f43edaf723e1f4a8ef4ae89d00a34 when namespaces were introduced, so it is quite a long time ago.

Maybe it could be removed, because it’s not well documented, buggy and I don’t see a point in providing a set of fixed links :)

Reviews 3