Project

General

Profile

Actions

Bug #103573

open

Using site configuration in TCA not working for new page

Added by Philipp Gollmer 27 days ago. Updated 26 days ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2024-04-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/SiteHandling/UseSiteInTCA.html

// ...
'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.


Files

new_page_error.png (38.1 KB) new_page_error.png Philipp Gollmer, 2024-04-09 06:35
Actions #2

Updated by Gerrit Code Review 26 days ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83720

Actions #3

Updated by Gerrit Code Review 26 days ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83720

Actions #4

Updated by Gerrit Code Review 26 days ago

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83723

Actions #5

Updated by Gerrit Code Review 26 days ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83720

Actions

Also available in: Atom PDF