Issue Bug Closed

#90202Link Browser use wrong default title text

Michael Binder 01/25/20, 16:24 updated 04/01/20, 21:14

Description

The Link Browser used the last Titletext of an element and not the given default value.

Given is the following yaml config:

classesAnchor:
  internalLink:
    class: 'internal-link'
    type: 'page'
    titleText: 'Expected default title text'
  internalLinkNewWindow:
    class: 'internal-link-new-window'
    type: 'page'
    target: '_blank'
    titleText: 'Displayed title text'

buttons:
  link:
    page:
      properties:
        class:
          default: internal-link
    properties:
      class:
        allowedClasses: 'internal-link, internal-link-new-window'

I expected as default title text ‘Expected default title text’ of the selected default class ‘Internal Link’, but the last title text (‘Displayed title text’) is displayed (see screenshot).

This happens in TYPO3 10.3 and also in TYPO3 9.

Possible solutions:
the default value is directly overwritten again in ‘\TYPO3\CMS\RteCKEditor\Controller\BrowseLinksController::renderLinkAttributeFields’ this part should be modified.

if ($conf['titleText']) {
   $this->classesAnchorClassTitle[$conf['class']] = ($this->classesAnchorDefaultTitle[$conf['type']] = $this->contentLanguageService->sL(trim($conf['titleText'])));
}

Reviews 3