Issue Bug Closed

#90369Changing the href with the link Wizard when the a tag has multiple classes replace the link text with the href

Rachel Foucard 02/13/20, 12:04 updated 07/10/26, 13:58

Description

Hello,

You can reproduce the bug in a 9LTS platform, with ckeditor for instance :

  • apply multiple classes on a link (ex: btn btn-primary)
  • double click on the link to change the href with the wizard
  • change the link url

> the link text is replaced by the href

Cheers,
Rachel

Reviews 0

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

Files 6

History 8

  1. Nikita Hovratov commented <span data-processor="relativetime" data-value="2020-02-15T11:27:53+00:00" > 02/15/20, 11:27 </span>

    I tried this, but the linktext doesn’t get replaced by the href. Instead the link class just gets removed.
    By changing the link url you mean the external url, right?

  2. Rachel Foucard commented <span data-processor="relativetime" data-value="2020-02-15T12:38:53+00:00" > 02/15/20, 12:38 </span>

    Hi Nikita,
    When I try to change the url link with an external url, it replace the link text with the url, and if I test with a page link, then it replace the link text with the “t3:” code. But only if the class attribute has at least 2 classes.

    Cheers,
    Rachel

  3. Andreas Kienast commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2020-03-26T16:15:51+00:00" > 03/26/20, 16:15 </span>

    I fail to reproduce the issue.

    1. Does this issue still occur in the current version?
    2. Could you please provide a screencast that reveals the issue?

    Kind regards
    Andreas

  4. Rachel Foucard commented and changed attached screen-01.PNG attached screen-02.PNG attached screen-03.PNG attached screen-04.PNG <span data-processor="relativetime" data-value="2020-03-26T17:25:16+00:00" > 03/26/20, 17:25 </span>

    Hi Andreas,

    Sure, here is a RTE with a link button (from bootstrap package configuration) :
    screen-01.PNG

    You can see that we have 2 classes : btn and btn-primary in the a tag :
    screen-02.PNG

    If I modify the link with the wizard:
    screen-03.PNG

    Then the all a tag is replaced with the src value :
    screen-04.PNG

    Tested today with a 9.5.14 version.

    Cheers,
    Rachel

  5. Riccardo De Contardi commented and changed attached cattura1.png attached Cattura2.png <span data-processor="relativetime" data-value="2024-12-13T15:00:40+00:00" > 12/13/24, 15:00 </span>

    after so many time (sorry) I’ll limit my inquiry to TYPO3 main (14.0.0-dev), 13.4.2 and 12.4.24

    the tests have been always performed under the following conditions

    - no Bootstrap Package installed (fresh installation)
    - default RTE config (default.yaml) shipped with TYPO3

    test procedure

    1. Create a new page, create a new “Regular Text Element” CE
    2. Put in the bodytext some text (a couple of lorem ipsum paragraph)
    3. select some words with the mouse and add a link using the wizard (click the link button on the RTE dashboard)
    4. as link type, use internal link (select another TYPO3 page)

    The result so far is that the link is added; to modify the link you have to click on it and it opens a pop-up like the one shown on the following image

    cattura1.png

    5. now I used the “Source” RTE button to directly edit the html and added two classes to the <a> tag; I used 2 sets of classes, on two distinct anchors:

    5.1. I added the Bootstrap classes btn btn-primary
    5.2. I added other classes myclass anotherclass

    and saved everything

    The result on all the TYPO3 versions is the same: the link so far is kept and the classes are still kept; the only difference is that the Bootstrap classes in some way kick in and interfere, so the result is not very good to be seen (see following image):

    Cattura2.png

    Though, it is still possible to click on the link and edit it via the popup. The only difference between the link with the Bootstrap classes and the one with the other ones is that the first gains the cursor:pointer style thanks to the Bootstrap classes

    6. I clicked on the link and the popup to edit it and changed it to “external URL” type; i linked to https://www.google.com

    Results:

    On all TYPO3 versions

    - the classes are still kept (checked with the source button)
    - the href attribute is updated (checked with the source button)
    - the text of the link still remains the same (albeit not much visible on the links with the Bootstrap classes)

    Is this test enough? Or a different one should be performed?

  6. Riccardo De Contardi commented and changed status New Closed <span data-processor="relativetime" data-value="2026-07-10T13:58:21+00:00" > 07/10/26, 13:58 </span>

    Closed as resolved on version 14 in agreement with the reporter.