#110592CONTENT with recursive ignores content_from_pid when pidInList is this
Description
Problem
ContentObjectRenderer resolves the keyword “this” in “pidInList” in two
different places, using two different values.
In method getQuery the recursive expansion replaces a “this” entry with
the id of the current page, taken from the page information attribute,
before expanding the page tree and writing back a concrete pid list.
In method getQueryConstraints the keyword “this” is instead replaced by
the content pid of the page information. That value is the target of the
page property “Show content from page” (pages field content_from_pid) if
that field is set, and the current page id otherwise.
Effect
On a page which uses “Show content from page”, a CONTENT object with
pidInList = this behaves inconsistently:
- Without recursive, the constraint resolves “this” to the configured
content source page and records are fetched from there. That is the
documented behaviour of the page property. - With recursive greater than zero, the expansion resolves “this” to the
current page, expands the subtree of the current page and writes a
concrete pid list. The constraint never sees the keyword anymore, so the
configured content source page is ignored.
The page property “Show content from page” is therefore silently dropped
as soon as recursive is used, while it is respected without it.
Affected code
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php,
method getQuery (recursive expansion) versus method getQueryConstraints.
The same code is present in main, 14.3 and 13.4. No functional test
covers the combination of content_from_pid and recursive.
Expected
Both places resolve the keyword consistently, so that a recursive
CONTENT object on a page with “Show content from page” fetches records
from the configured content source page and its subtree.
Reviews 1
History 14
-
Gerrit Code Review pushed patch set 1 for main to change 95539 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-01T21:31:17+00:00" > 09/01/26, 21:31 </span> -
Stefan Bürk changed assigned to Stefan Bürk TYPO3 Version
1513 <span data-processor="relativetime" data-value="2026-09-01T21:34:40+00:00" > 09/01/26, 21:34 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95539 <span data-processor="relativetime" data-value="2026-09-01T21:35:19+00:00" > 09/01/26, 21:35 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 95539 <span data-processor="relativetime" data-value="2026-09-01T22:32:11+00:00" > 09/01/26, 22:32 </span>