Project

General

Profile

Actions

Bug #99077

closed

TYPO3 11.5.18 regression: Commit 551f540fc3 caused link browser changes to no longer be saved

Added by Leonie Philine over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
2022-11-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Change introducing the regression: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76404

Steps to reproduce:
- Set an RTE link to a page
- Save
- Use the RTE link browser to make the link point to a different page
- Save
- Verify the link was not changed

Expected:
- Link is expected to be set to the newly selected page

Actual result:
- Link still points to the previously linked page. -> Changing the link's target page with the link browser is no longer possible since https://github.com/typo3/typo3/commit/551f540fc3 .

What is happening:
- this.CKEditor.extractSelectedHtml(true) extracts the old link, including the <a> tag, where it was intended to extract only its contents.
- The entire old link (instead of only its contents) is inserted as innerHTML into the new link: linkElement.setHtml(originalLinkText);
- This results in two nested links, e.g. <a href="t3://page?uid=2"><a data-cke-saved-href="t3://page?uid=1" href="t3://page?uid=1">Link text</a></a>, where pid 2 is the newly selected page, and pid 1 is the original link. See attached image before-save.png.
- The result is saved and cleaned - only the old <a data-cke-saved-href="t3://page?uid=1" href="t3://page?uid=1">Link text</a> remains after saving. See attached image after-save.png.

Downgrading from TYPO3 11.5.18 to TYPO3 11.5.17 makes it work again.

Note that there is no error message of any kind, so users will save their work and move on - unaware that the link target pages were not actually changed!


Files

after-save.png (12.1 KB) after-save.png Leonie Philine, 2022-11-14 03:41
before-save.png (10.7 KB) before-save.png Leonie Philine, 2022-11-14 03:41

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #89404: Setting link on styled text node removes styleClosed2019-10-13

Actions
Related to TYPO3 Core - Bug #93457: ckeditor link wizard remove tags into selected textClosed2021-02-07

Actions
Actions #1

Updated by Benni Mack over 1 year ago

  • Related to Bug #98175: Option fixAttrib.[attribute].prefixRelPathWith of HTMLParser throws warning since PHP 8 added
Actions #2

Updated by Benni Mack over 1 year ago

  • Related to deleted (Bug #98175: Option fixAttrib.[attribute].prefixRelPathWith of HTMLParser throws warning since PHP 8)
Actions #3

Updated by Benni Mack over 1 year ago

  • Related to Bug #89404: Setting link on styled text node removes style added
Actions #4

Updated by Benni Mack over 1 year ago

  • Related to Bug #93457: ckeditor link wizard remove tags into selected text added
Actions #5

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76612

Actions #6

Updated by Benni Mack over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF