#105331Target _blank is incorrectly added to relative internal links/deeplinks
Description
After the upgrade from TYPO3 v11 to v12, target="_blank" is incorrectly added to relative deeplinks.
RTE ckeditor source:
<p>
<a href="/kontakt/">Deeplink with relative url</a>
</p>
<p>
<a href="t3://page?uid=1234">Deeplink with t3 scheme</a>
</p>
<p>
<a href="https://typo3.org/">External Link</a>
</p>
+*Rendered frontend source:*+
(with config.forceAbsoluteUrls = 0 or lib.parseFunc_RTE.tags.a.typolink.forceAbsoluteUrl = 0)
<p>
<a href="/kontakt/" target="_blank">Deeplink with relative url</a>
</p>
<p>
<a href="/kontakt/">Deeplink with t3 scheme</a>
</p>
<p>
<a href="https://typo3.org/" target="_blank" rel="noreferrer">External Link</a>
</p>
+*Rendered frontend source:*+
(with config.forceAbsoluteUrls = 1 or lib.parseFunc_RTE.tags.a.typolink.forceAbsoluteUrl = 1)
<p>
<a href="https://mysite.localhost/kontakt/" target="_blank">Deeplink with relative url</a>
</p>
<p>
<a href="https://mysite.localhost/kontakt/">Deeplink with t3 scheme</a>
</p>
<p>
<a href="https://typo3.org/" target="_blank" rel="noreferrer">External Link</a>
</p>Reviews 3
History 916
-
Patrick Lenk changed subject
Target _blank is incorrectly added to relative deeplinksTarget _blank is incorrectly added to relative internal links/deeplinks category Tagsrte, ckeditor, relative, links, deelinksrte, ckeditor, relative, internal, links, deelinks <span data-processor="relativetime" data-value="2024-10-18T08:45:12+00:00" > 10/18/24, 08:45 </span> -
Julian Mair commented <span data-processor="relativetime" data-value="2025-01-27T15:05:55+00:00" > 01/27/25, 15:05 </span>
I can confirm that this also happens in Typo3 v13
-
Gerrit Code Review pushed patch set 1 for main to change 88598 status
NewUnder Review <span data-processor="relativetime" data-value="2025-03-16T08:04:07+00:00" > 03/16/25, 08:04 </span> -
Gerrit Code Review pushed patch set 2 for main to change 88598 <span data-processor="relativetime" data-value="2025-03-16T16:22:09+00:00" > 03/16/25, 16:22 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 88598 <span data-processor="relativetime" data-value="2025-03-16T21:43:52+00:00" > 03/16/25, 21:43 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 88598 <span data-processor="relativetime" data-value="2025-03-17T06:45:41+00:00" > 03/17/25, 06:45 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 88610 <span data-processor="relativetime" data-value="2025-03-17T08:38:54+00:00" > 03/17/25, 08:38 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-03-17T08:40:09+00:00" > 03/17/25, 08:40 </span>Applied in changeset commit:5ebafcc18de77fbab35a57c687faf0c694bbf6fd.
-
Patrick Lenk commented <span data-processor="relativetime" data-value="2025-03-17T12:49:52+00:00" > 03/17/25, 12:49 </span>
Georg Ringer wrote in #note-9:
> Applied in changeset commit:5ebafcc18de77fbab35a57c687faf0c694bbf6fd.please add a patch also for 12.4. many thanks!
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 88615 status
ResolvedUnder Review <span data-processor="relativetime" data-value="2025-03-17T13:18:16+00:00" > 03/17/25, 13:18 </span> -
Gerrit Code Review pushed patch set 2 for 12.4 to change 88615 <span data-processor="relativetime" data-value="2025-03-17T13:42:21+00:00" > 03/17/25, 13:42 </span>
-
Georg Ringer commented <span data-processor="relativetime" data-value="2025-03-17T13:56:59+00:00" > 03/17/25, 13:56 </span>
patrick merged in 12 as well
-
Georg Ringer commented and changed status
Under ReviewResolved <span data-processor="relativetime" data-value="2025-03-17T14:00:09+00:00" > 03/17/25, 14:00 </span>Applied in changeset commit:2c654808d639bacce090585415bf36c3497535a3.
-
Patrick Lenk commented <span data-processor="relativetime" data-value="2025-03-19T16:07:37+00:00" > 03/19/25, 16:07 </span>
Georg Ringer wrote in #note-13:
> patrick merged in 12 as wellThanks. Unfortunately, the bug does not seem to have been fixed, at least for the scenario I reported above. Relative links with leading / in ckeditor.
For link fields such as header_link, the incorrect target _blank is only not added if config.forceAbsoluteUrls = 0. With config.forceAbsoluteUrls = 1 _blank is still added. -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:32:52+00:00" > 12/02/25, 14:32 </span>
Relative
internal-links/without the leading/are working as excpeted and does not have the target _blank. So it seems that in TYPO3 v12/relative-link/is handled as an absolute link.