Issue Bug Closed

#86701Setting different link targets in Link Browser does not work properly

Torben Hansen 10/19/18, 13:34 updated 10/19/18, 14:37

Description

As part of the RTE configuration (either yaml File or PageTS) you can define the default target attribute for links in the linkbrowser.

Example (yaml):

buttons:
  link:
    properties:
      class:
        allowedClasses: "internal-link,external-link"
    page:
      properties:
        class:
          default: "internal-link"
    url:
      properties:
        class:
          default: "external-link"

classesAnchor:
  internalLink:
    class: "internal-link"
    type: "page"
    target: "_top"
  externalLink:
    class: "external-link"
    type: "url"
    target: "_blank"

The example above defines target="_top" for the internal link class and target="_blank" for the external link class.

Steps to reproduce:

  1. Define a RTE configuration as shown above
  2. Create a text content element, paste some random text and link the pasted text
  3. When the linkbrowser opens initially, the Link Browser tab “Page” is shown with the default link target “_top”
  4. Select the tab “External URL” and the default link target keeps “_top”, which is wrong
  5. Select the tab “Email”
  6. Select the tab “External URL” again and now the default link target is “_blank”

I tested this with ext:rte_ckeditor and with ext:rtehtmlarea.

The reason for this behavior is, that the Link Browser uses the default target attribute of the first tab that is opened and passes it as link parameter linkAttributes[target]= to all other tabs. Bugfix could be to exclude the linkAttributes[target]= parameter.

The bug affects TYPO3 v9 and v8 and propably lower versions.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.