96016[FEATURE] Improve link handling in the CKEditor link plugin
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Garvin Hicking +1
- Josua Vogel +1
-
Verified V +2 Done
- Georg Ringer +2
- Garvin Hicking +1
- Josua Vogel +1
- core-ci +1 CI
Issues 3
Files 24
- Build/Sources/Sass/element/typo3-rte-ckeditor-ckeditor5.scss+15 −5
- Build/Sources/TypeScript/backend/tests/link-resolver-test.tsnew+32 −0
- Build/Sources/TypeScript/backend/link-resolver.ts2new+95 −0
- Build/Sources/TypeScript/rte-ckeditor/plugin/typo3-link.ts+91 −12
- Build/Sources/TypeScript/rte-ckeditor/rte-link-browser.ts+10 −4
- typo3/sysext/backend/Classes/Controller/LinkPreviewController.php4new+158 −0
- typo3/sysext/backend/Configuration/Backend/AjaxRoutes.php+7 −0
- typo3/sysext/backend/Resources/Public/Css/backend.css+3 −1
- typo3/sysext/backend/Resources/Public/JavaScript/link-resolver.jsnew+13 −0
- typo3/sysext/backend/Tests/Functional/Controller/Fixtures/LinkPreviewResourceAccess/Files/allowed.txtnew+1 −0
- typo3/sysext/backend/Tests/Functional/Controller/Fixtures/LinkPreviewResourceAccess/Files/outside.txtnew+1 −0
- typo3/sysext/backend/Tests/Functional/Controller/Fixtures/LinkPreviewResourceAccess/Files/secret.txtnew+1 −0
- typo3/sysext/backend/Tests/Functional/Controller/Fixtures/LinkPreviewResourceAccess/be_groups.csvnew+3 −0
- typo3/sysext/backend/Tests/Functional/Controller/Fixtures/LinkPreviewResourceAccess/be_users.csvnew+4 −0
- typo3/sysext/backend/Tests/Functional/Controller/Fixtures/LinkPreviewResourceAccess/sys_file.csvnew+5 −0
- typo3/sysext/backend/Tests/Functional/Controller/Fixtures/LinkPreviewResourceAccess/sys_filemounts.csvnew+3 −0
- typo3/sysext/backend/Tests/Functional/Controller/Fixtures/LinkPreviewResourceAccess/sys_file_storage.csvnew+20 −0
- typo3/sysext/backend/Tests/Functional/Controller/LinkPreviewControllerResourceAccessTest.phpnew+158 −0
- typo3/sysext/backend/Tests/Functional/Controller/LinkPreviewControllerTest.phpnew+155 −0
- typo3/sysext/backend/Tests/Functional/Fixtures/be_users_link_preview.csvnew+5 −0
Show 4 more files
- typo3/sysext/backend/Tests/Functional/Fixtures/pages_link_preview.csvnew+5 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Feature-99678-ImprovedLinkHandlingInRichTextEditor.rstnew+39 −0
- typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/plugin/typo3-link.js+2 −1
- typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/rte-link-browser.js+1 −1
Review log 1519
-
Benni Mack uploaded patch set 1 09/23/26, 18:59
-
core-ci voted on patch set 1 V +1 09/23/26, 19:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109104
-
Garvin Hicking commented on patch set 1 09/25/26, 13:51
The link badge can grow too large, and clicking on the preview icon will make it "jump" to the right then. Also the badge contains redundant info for me: ``` <span class="ck-link-toolbar__preview-text"> <span class="ck-link-toolbar__preview-title">Camino Route Comparison</span> <span class="ck-link-toolbar__preview-path">/Newmino/Camino/Camino Route Comparison/</span></span> ``` So the path already contains the title too - it isn't visually distinguished either. Since place is scarce in the badge, I'd probably only show the page title itself, not the path to it? The path could be revealed in the title tooltip (with the uid) only? -
Garvin Hicking commented on patch set 1 09/25/26, 13:54
If I link to a folder, the "open in tab" function opens nothing, the screen only flashes and nothing happens. Probably, a folder link cannot be opened for a preview? -
Garvin Hicking commented on patch set 1 09/25/26, 14:22
LinkPreviewController.php:72```suggestion } catch (\Throwable) { return new JsonResponse($result); } ``` this would add more fallback exceptions for cases like: ``` - ?href=t3://url?url[]=x → parse_str yields an array → UrlLinkHandler::addHttpSchemeAsFallback(array) → TypeError (strict_types). - ?href=t3://email?email[]=x → parse_url(array) → TypeError. - ?href=t3://folder?storage=1&identifier=/../etc/ → LocalDriver → InvalidPathException (AbstractHierarchicalFilesystemDriver.php:50), which extends TYPO3\CMS\Core\Resource\Exception → \Exception ``` -
Garvin Hicking commented on patch set 1 09/25/26, 14:24
LinkPreviewController.php:149This might disclose/leak record infos, depending on implementations. I'm unsure how to gate this properly though. -
Garvin Hicking commented on patch set 1 09/25/26, 14:24
link-resolver.ts:1This file is missing the GPL header. (does TYPO3-dev-companion have that as a rule already?) -
Garvin Hicking uploaded patch set 2
V +109/25/26, 14:44more tests -
core-ci voted on patch set 2 V +1 09/25/26, 14:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109254
-
Benni Mack uploaded patch set 3
V +109/25/26, 16:29 -
Benni Mack uploaded patch set 4 09/25/26, 16:35
-
Benni Mack commented on patch set 4 09/25/26, 16:37
Reply
DoneReply
Donelink-resolver.ts:1ReplyDoneLinkPreviewController.php:72ReplyDoneLinkPreviewController.php:149ReplyDone -
core-ci voted on patch set 3 V +1 09/25/26, 16:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109270
-
core-ci voted on patch set 4 V +1 09/25/26, 16:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109272
-
Garvin Hicking voted on patch set 4 CR +1 V +1 09/25/26, 18:18
-
Josua Vogel voted on patch set 4 V +1 09/26/26, 10:14
-
Josua Vogel voted on patch set 4 CR +1 09/26/26, 10:20
-
Georg Ringer voted on patch set 4 CR +2 V +2 09/28/26, 19:45
-
Georg Ringer merged patch set 5 09/28/26, 19:45