Issue Bug Closed

#102069Constants not present on root page in workspace / translation overlay

Philipp Kitzberger 09/29/23, 13:46 updated 12/02/25, 14:37

Description

It seems as if the usage of a constants within a “marker” (e.g. ###PAGE_TSCONFIG_IDLIST###) is not working when the root page of a site is being workspaced.

TCA:

$GLOBALS['TCA']['pages']['columns']['fe_group']['config']['foreign_table_where'] = 'AND fe_groups.pid IN (###CURRENT_PID###,###PAGE_TSCONFIG_IDLIST###)';

PageTS:

TCEFORM.pages.fe_group.PAGE_TSCONFIG_IDLIST = {$pid.userSource}

Site config:

settings:
  pid:
    userSource: 123

Here’s the SQL error you get after saving the workspace change.

SELECT `fe_groups`.`uid`, `fe_groups`.`pid`, `fe_groups`.`title`, `fe_groups`.`hidden` FROM `fe_groups`, `pages` WHERE (fe_groups.pid IN (321,)) ...

As you can see CURRENT_PID is being processed correctly, but PAGE_TSCONFIG_IDLIST is just empty, hence the SQL error.

This is generally working. But not for a workspace’d root page! I think it’s due to the fact that this page has now a different ID for which no site config exists. When adding a dummy site config with that ID as a rootPageId, then the constants are present!

Hint: the workaround from #93746 doesn’t work here.

Reviews 3