93049[FEATURE] Enable rel option for non-RTE link fields
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Georg Ringer +1
-
Verified V +2 Done
- Garvin Hicking +2
- Georg Ringer +1
- core-ci +1 CI
Issues 1
Files 11
- typo3/sysext/backend/Classes/Controller/AbstractLinkBrowserController.php5+8 −0
- typo3/sysext/backend/Classes/Form/Element/LinkElement.php2+4 −3
- typo3/sysext/backend/Classes/LinkHandler/AbstractLinkHandler.php+0 −2
- typo3/sysext/backend/Tests/Unit/Controller/AbstractLinkBrowserControllerTest.phpnew+66 −0
- typo3/sysext/core/Classes/LinkHandling/TypoLinkCodecService.php+9 −2
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-99699-EnableRelAttributeForLinkFieldsOutsideRte.rstnew+34 −0
- typo3/sysext/core/Tests/Unit/LinkHandling/TypoLinkCodecServiceTest.php+68 −0
- typo3/sysext/frontend/Classes/Typolink/LinkFactory.php+5 −1
- typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php+21 −0
- typo3/sysext/redirects/Configuration/TCA/sys_redirect.php3+1 −1
- typo3/sysext/seo/Configuration/TCA/Overrides/pages.php+1 −1
Review log 1722
-
Eric Harrer uploaded patch set 1 03/03/26, 20:34
-
core-ci voted on patch set 1 V +1 03/03/26, 20:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97222
-
Eric Harrer uploaded patch set 2
V +103/03/26, 20:45 -
Eric Harrer commented on patch set 2 03/03/26, 20:54
Classification note: I considered both [BUGFIX] and [FEATURE] for this patch. “appearance.allowedOptions” already made ‘rel’ available as a configurable option for fields of type “type=link,” but when not used in RTE, this option was effectively ignored and did not reach the rendered link output. This patch makes the existing configuration effective. Since it changes the observable runtime behavior, I have classified it as [FEATURE]. The current TCA reference also documents `rel` as only available for RTE so far (https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TCA/blob/main/Documentation/ColumnsConfig/Type/Link/_Properties/_Appearance.rst.txt). After this patch is merged, I would update this accordingly. -
core-ci voted on patch set 2 V +1 03/03/26, 20:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97224
-
Eric Harrer uploaded patch set 3
V +103/03/26, 21:03 -
core-ci voted on patch set 3 V +1 03/03/26, 21:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97225
-
Eric Harrer uploaded patch set 4
V +103/03/26, 21:12 -
core-ci voted on patch set 4 V +1 03/03/26, 21:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97226
-
Garvin Hicking commented on patch set 4 03/03/26, 21:55
AbstractLinkBrowserController.php:509please use the short domain syntax for new LLL translation keysAbstractLinkBrowserController.php:510I don't have the deepest knowledge about this - but do you know where "lrel" is re-used again? This name seems to be a deadend - I also find it in the "BrowseLinksController" but nowhere else?LinkElement.php:338same here for label notation. Maybe while you're add it you could adjust the ones in the same array too?sys_redirect.php:147Can you say why 'rel' is removed here in the TCA? What effect could it have to 3rd party TCA if they list 'rel' in their allowedOptions? -
Eric Harrer uploaded patch set 5
V +103/03/26, 23:13 -
core-ci voted on patch set 5 V +1 03/03/26, 23:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97234
-
Eric Harrer commented on patch set 4 03/03/26, 23:25
AbstractLinkBrowserController.php:509ReplyDoneAbstractLinkBrowserController.php:510Reply`lrel` is not a dead-end; it follows the generic LinkBrowser naming scheme. The browser collects attributes dynamically from `data-linkbrowser-attribute-fields` and reads each input via `name="l" + fieldName`. TypeScript source reference: Build/Sources/TypeScript/backend/link-browser.ts (method `getLinkAttributeValues()`). So for field `rel`, the expected input name is `lrel`.LinkElement.php:338ReplyDonesys_redirect.php:147ReplyThis follows the same principle as for `pages.canonical_link`: we only keep options that are actually consumed by runtime behavior. Before this patch, these `rel` inputs were effectively not shown for non-RTE link fields; with this patch they would become visible. For these two specific fields, showing them would be unnecessary and likely irritate editors, because the values are not meaningfully consumed there. - For `pages.canonical_link`, canonical rendering already enforces `rel="canonical"`. - For `sys_redirect.target`, redirect processing consumes only `url` and `additionalParams` (query handling), but not `rel`. Both cases (including rationale) are already documented in this commit message. -
Garvin Hicking commented on patch set 5 CR +1 V +1 03/04/26, 13:09
AbstractLinkBrowserController.php:510ReplyThanks!sys_redirect.php:147ReplyOh I'm sorry, I totally overread that part. Thanks! -
Georg Ringer commented on patch set 5 CR +1 V +1 03/04/26, 16:39
would like @benni@typo3.org to review that -
Benni Mack commented on patch set 5 CR -1 03/04/26, 16:47
This is a huge deal: We extend TypoLink with a "sixth" parameter. We could however change the Typolink syntax now to add A-Tag attributes as the second parameter and slim down this syntax completely Example: 42 'class="my-class" rel="my-rel"' ... WDYT? Asking @markus.klein@typo3.org for another opinion? -
Garvin Hicking commented on patch set 5 03/04/26, 17:56
Reply
That sounds like asking for breakage, as there are likely parsers for "raw" bodytext patterns out there, and we'd have to create SQL based migrations?! Or we have to create nasty fallback logic to detect if the second argument is "all arguments"?! A sixth parameter will likely pass any custom argument parsing and existing data. -
Eric Harrer commented on patch set 5 03/04/26, 20:01
Reply
Argument 2 is currently defined and consumed as `target` in core parsing/rendering. Extending argument 2 as suggested would therefore change semantics of an existing argument position, not just add functionality. The 6th-argument solution avoids that semantic shift and keeps this change "Breaking Change"-free: - Existing TypoLink parsing (1–5 segments) remains unchanged. - Existing TypoLink values are not reinterpreted. - Existing TypoLink values do not need migration, regardless of where they are used (database records, TypoScript, Fluid templates, or values passed through PHP code). This patch only adds an optional trailing 6th segment (`rel`) when explicitly used. -
Markus Klein commented on patch set 5 03/13/26, 11:50
Reply
@benni@typo3.org I'm really not sure. I guess the 6th argument is a safe path. Making a complete restructuring of typolink legacy-syntax is maybe not benefitial. I rather would drop the old syntax at some point completely. In general I'm not a fan of "html markup" in link fields. I already anticipate the advanced editors messing around with this. 🙈 -
Benni Mack commented on patch set 5 CR 0 03/13/26, 12:13
Reply
Yeah, i thought about this issue now for a while as well, and I'm fine with this one. -
Garvin Hicking voted on patch set 5 CR +2 V +2 03/13/26, 12:26
-
Garvin Hicking merged patch set 6 03/13/26, 12:26