Issue Bug Under Review Quiet

#110182Site setting placeholders in "pages" TCA "foreign_table_where" fail after repeated reloads in backend modules using the page tree element

Jan Kornblum 07/10/26, 11:09 updated 10/01/26, 08:39

Description

In backend modules using @typo3/backend/page-tree/page-tree-element, site setting placeholders in foreign_table_where of the “pages” TCA are initially resolved correctly, but fail after repeated browser reloads.

ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['pages'], [
    'columns' => [
        'fe_group' => [
            'config' => [
                'foreign_table_where' =>
                    'AND {#fe_groups}.{#pid} IN (###SITE:settings.storagePidUsers###) '
                    . 'ORDER BY {#fe_groups}.{#title}',
            ],
        ],
    ],
]);

To reproduce this error:

  1. Clear TYPO3 caches.
  2. Open a backend module using @typo3/backend/page-tree/page-tree-element.
  3. The first request works correctly.
  4. Reload the browser.
  5. From the second reload onward, the backend may fail with an SQL syntax error.

The error seems to be caused by the unresolved site setting placeholder in the pages.fe_group TCA configuration. During processing, this code is reached in AbstractItemProvider::processForeignTableClause():

$parsedSiteConfiguration = $this->parseSiteConfiguration(
    $result['site'],
    $foreignTableClause
);

In the failing request, the FormDataProvider result does not contain the expected site information, so the placeholder cannot be resolved, which leads to an empty IN() operator in the sql query. The issue appears to affect specifically relations configured in the pages TCA. Equivalent foreign_table_where configurations using the same ###SITE:settings.*### placeholder work correctly in:

  • fe_users
  • fe_groups
  • custom extension tables

The problem also seems limited to backend modules using the page tree web component in conjunction with the “pages” table. It happens with or without a selected page in the tree as well es on or below a siteroot.

Without the custom extension containing this pages TCA override, the error cannot be reproduced.

Site setting placeholders in pages TCA foreign_table_where should remain resolvable on every request, including repeated browser reloads in backend modules using the page tree element.

This feature is documented here:
https://docs.typo3.org/permalink/t3coreapi:sitehandling-intca

In case of no site could be resolved, at least this should not raise an error.

This issue didn’t exist before 14 lts.

Reviews 1

History 711

  1. Jan Kornblum changed Tags site, settings, pages, foreign_table_where site, settings, pages, foreign_table_where, sql, error <span data-processor="relativetime" data-value="2026-07-10T11:56:26+00:00" > 07/10/26, 11:56 </span>