#110431config.intTarget and config.extTarget are ignored for page links
Description
A page link never receives `config.intTarget`, and a page link resolving to a
different site never receives `config.extTarget` – the attribute is absent from the
rendered `` tag. TYPO3 13.4 renders it, and current 14.3.5 does not.
Steps to reproduce:
- Set `config.intTarget = _top` in the site’s TypoScript setup.
- Render an internal page link, e.g. `<f:link pageuid="1">home`,<br>a `HMENU` entry, or a typolink with `parameter = t3://page?uid=1`.</f:link>
- Look at the rendered anchor:
- Expected: ``
- Actual: ``
In a site upgraded from 13.4 to 14.3.5, the number of `target=”_top”` attributes
across 58 crawled pages dropped from 1222 to 3. The three remaining ones come from
a typolink configuration that sets `target` explicitly, which is read before the
TypoScript value.
Cause:
`AbstractTypolinkBuilder::resolveTargetAttribute()` reads both settings from
`$contentObjectRenderer->getRequest()->getAttribute(‘frontend.typoscript’)`, so it
needs the `ContentObjectRenderer` as its third argument. Without it the config array
is empty and the method returns `’‘`.
attribute `currentContentObject` that `LinkFactory` sets:
- `LegacyLinkBuilder.php:43` and `:46`
- `FileOrFolderLinkBuilder.php:60`
- `ExternalUrlLinkBuilder.php:46`
- `PageLinkBuilder.php:443` – `$this->resolveTargetAttribute($conf, ‘extTarget’)`
- `PageLinkBuilder.php:447` – `$this->resolveTargetAttribute($conf, ‘target’)`
The renderer is available in the calling scope: `buildLink()` already reads it into a
local variable (`PageLinkBuilder.php:97`) but does not hand it down.
**Possible fix:**
Pass the `ContentObjectRenderer` to both calls, the way the other builders do. That
means forwarding it into `calculateTargetAttribute()`, whose signature does not carry
it today.
(Line numbers are from 14.3.5)
Reviews 2
Related issues 1
History 24
-
Gerrit Code Review pushed patch set 1 for main to change 95316 status
NewUnder Review <span data-processor="relativetime" data-value="2026-08-13T13:32:17+00:00" > 08/13/26, 13:32 </span> -
Anton Danilov changed Related to #106405 <span data-processor="relativetime" data-value="2026-08-13T13:32:20+00:00" > 08/13/26, 13:32 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95331 <span data-processor="relativetime" data-value="2026-08-14T13:51:09+00:00" > 08/14/26, 13:51 </span>
-
Anton Danilov commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-08-14T14:25:09+00:00" > 08/14/26, 14:25 </span>
Applied in changeset commit:30e837f5f4fb3adf8fce13f8565a075763955146.