Feature #87551


Explicitly allow ignoring "pidInList" in TS select function

Added by Andreas Wolf over 5 years ago. Updated over 3 years ago.

Should have
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Sprint Focus:


Currently, the implementation of the TypoScript function "select" will automatically set "pidInList" to "this" if it is not set, even when "uidInList" is specified and points to a uid on a different page.
The result will then be empty, even if the record exists and could be displayed. This is confusing and hard to understand, especially since there is no documented way of ignoring "pidInList". Instead, some people implement workarounds with high recursion limits e.g. descending from the site's root page.

My proposal is to add a new setting "ignore" that will lead to the value not being evaluated. This works already, since the non-empty value will prevent the default of "this" from being used. However, it is undocumented behaviour and thus might break in the future w/o any notice. Therefore, let's make it explicit and document it.

Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Feature #93450: ContentObjectRenderer: allow TypoScript select object without any constraint of uidInList or pidInListUnder Review2021-02-05

Actions #1

Updated by Stefan P over 4 years ago

I'd like add a "+1" here.

This is for example totally relevant when using ext:news with inline content element rendering. The news records and their CE sit in some folder but the page used in FE is the detail page. So CTypes using custom inline elements and data processors do not work (they needed to be selected from the news storage pid, but are tried to be selected from the current FE page -> not found).

For anyone reading this: A nasty workaround is this:

// set pid list to your siteroot
pidInList = 1
// set depth to a reasonably high number
recursive = 10

It would be nice if there's a new keyword beside this and root, like ignore or something, which then prevents adding the pid condition in the SQL at all.

Actions #2

Updated by Mathias Brodala over 4 years ago

Evidently just setting pidInList = 0 (thus explicitly setting it to 0, zero) in fact leads to the pid part being dropped from the query.

However this will by default lead to a query with uid = 0, so setting uidInList at the same time is mandatory for a valid query.

We should clarify if this is intended behavior since TYPO3 itself makes use of this in AbstractMenuContentObject. If yes, it should be documented properly and tests should be added to verify this behavior and ensure it is not dropped accidentally.

Actions #4

Updated by Ayke Halder over 3 years ago

  • Related to Feature #93450: ContentObjectRenderer: allow TypoScript select object without any constraint of uidInList or pidInList added

Also available in: Atom PDF