Bug #99077
closedTYPO3 11.5.18 regression: Commit 551f540fc3 caused link browser changes to no longer be saved
100%
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
Updated by Benni Mack about 2 years ago
- Related to Bug #98175: Option fixAttrib.[attribute].prefixRelPathWith of HTMLParser throws warning since PHP 8 added
Updated by Benni Mack about 2 years ago
- Related to deleted (Bug #98175: Option fixAttrib.[attribute].prefixRelPathWith of HTMLParser throws warning since PHP 8)
Updated by Benni Mack about 2 years ago
- Related to Bug #89404: Setting link on styled text node removes style added
Updated by Benni Mack about 2 years ago
- Related to Bug #93457: ckeditor link wizard remove tags into selected text added
Updated by Gerrit Code Review about 2 years 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
Updated by Benni Mack about 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 036b651f3d9caa8849f25186ee627a3896ba9ff7.