#103573Using site configuration in TCA not working for new page
Description
“###SITE:mySetting.categoryPid###” does not work when you are in the form to create a new page.
The TCA for pages has therefore been extended and exactly this configuration has been implemented.
// ...
'fieldConfiguration' => [
'foreign_table_where' => ' AND ({#sys_category}.uid = ###SITE:rootPageId### OR {#sys_category}.pid = ###SITE:mySetting.categoryPid###) ORDER BY sys_category.title ASC',
],
// ...
As no site object exists at this point, it is from the “NullSite” object. This is why the parsing in AbstractitemProvider->parseSiteConfiguration() exits at this point and produces an error, because it doesn’t parse the statement. Since no site exists, the site configuration cannot be read.
Therefore this behavior only exists when a new page is created. An existing page works perfectly.
Same behavior exists in V12 and V11.
Reviews 4
Files 1
History 39
-
Mathias Bolt Lesniak commented <span data-processor="relativetime" data-value="2024-04-09T08:43:52+00:00" > 04/09/24, 08:43 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 83720 status
NewUnder Review <span data-processor="relativetime" data-value="2024-04-09T15:13:08+00:00" > 04/09/24, 15:13 </span> -
Gerrit Code Review pushed patch set 2 for main to change 83720 <span data-processor="relativetime" data-value="2024-04-09T15:15:27+00:00" > 04/09/24, 15:15 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 83723 <span data-processor="relativetime" data-value="2024-04-09T18:39:59+00:00" > 04/09/24, 18:39 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 83720 <span data-processor="relativetime" data-value="2024-04-09T18:43:03+00:00" > 04/09/24, 18:43 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 83720 <span data-processor="relativetime" data-value="2024-05-31T06:08:25+00:00" > 05/31/24, 06:08 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 83720 <span data-processor="relativetime" data-value="2024-05-31T06:26:17+00:00" > 05/31/24, 06:26 </span>
-
Mathias Bolt Lesniak commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2024-08-03T11:30:09+00:00" > 08/03/24, 11:30 </span>Applied in changeset commit:94538abeaa4b0e69aecb764eda592302eab96103.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2024-10-15T09:31:23+00:00" > 10/15/24, 09:31 </span>
See also: https://talk.typo3.org/t/using-site-configuration-in-tca-not-working-for-new-page/5327