Issue Bug Resolved

#110431config.intTarget and config.extTarget are ignored for page links

Julian Mair 08/11/26, 08:09 updated 08/14/26, 14:25

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:

  1. Set `config.intTarget = _top` in the site’s TypoScript setup.
  2. 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>
  3. 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 `’‘`.

Every other builder that resolves a target passes it, taking it from the request
attribute `currentContentObject` that `LinkFactory` sets:
  • `LegacyLinkBuilder.php:43` and `:46`
  • `FileOrFolderLinkBuilder.php:60`
  • `ExternalUrlLinkBuilder.php:46`
`PageLinkBuilder::calculateTargetAttribute()` does not, at either call site:
  • `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

History 24

  1. Anton Danilov commented and changed status Under Review Resolved done 0 % 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.