96030[BUGFIX] Resolve site markers in forms without a resolved site
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 4
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/30/96030/4 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/30/96030/4 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Merge conflicts 5
- main 92191[WIP][TASK] Migrate PageTree to Action API
- main 96543[WIP][POC][TASK] Write and read records by the same rules and rights
- main 95145[TASK] Migrate LanguageService->sL() labels to new domain syntax
- main 90848[FEATURE] Add thumbnail to new record wizard
- main 83208[WIP][FEATURE] Introduce Creation Wizards
Issues 1
Files 7
- typo3/sysext/backend/Classes/Controller/Page/NewMultiplePagesController.php+3 −0
- typo3/sysext/backend/Classes/Controller/Page/TreeController.php+3 −0
- typo3/sysext/backend/Classes/Controller/Wizard/PageWizardController.php+3 −0
- typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php+9 −9
- typo3/sysext/backend/Tests/Functional/Controller/Page/TreeControllerTest.php+17 −0
- typo3/sysext/backend/Tests/Functional/Controller/Wizard/PageWizardControllerTest.php+21 −0
- typo3/sysext/backend/Tests/Functional/Form/FormDataProvider/TcaSelectItemsTest.php+43 −0
Review log 812
-
Christian Spoo uploaded patch set 1 09/24/26, 09:20
-
core-ci voted on patch set 1 V +1 09/24/26, 09:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109145
-
Wolfgang Klinger commented on patch set 1 CR -1 09/25/26, 05:37
Thanks for the patch. Limiting the compile to "doktype" is a good optimisation, but it does not fix #110182. The cause is AbstractItemProvider::parseSiteConfiguration(). It returns an empty array when $result['site'] is null or a NullSite. The caller then skips the replacement and the ###SITE:...### placeholder stays in the SQL. Every form without a resolved site still runs into this: records on pid 0, pages outside a configured site, and treeConfig.startingPoints, which uses the same helper. The issue reporter also asks that an unresolved site must not raise an error. My suggestion: fix it in parseSiteConfiguration() by falling back to an empty configuration when there is no Site instance. Unresolved placeholders then resolve to an empty string and get quoted, so IN ('') is valid SQL that matches nothing. That is about three lines plus a test in TcaSelectItemsTest. -
Christian Spoo uploaded patch set 2
CR -1V +109/25/26, 09:40 -
core-ci voted on patch set 2 V -1 09/25/26, 09:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109234
-
Christian Spoo uploaded patch set 3
V -109/25/26, 10:19 -
Christian Spoo commented on patch set 3 09/25/26, 10:23
Reply
Thanks for your review and your thoughts regarding the underlying issue. I added that to my patchset. However, it turned out that PostgreSQL does not like comparing integer columns with IN ('') which is why I changed the value to SQL null which validates against every column type. -
core-ci voted on patch set 3 V +1 09/25/26, 10:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109235
-
Wolfgang Klinger commented on patch set 3 CR +1 09/25/26, 11:14
The data provider parameter could be ?SiteInterface instead of ?NullSite. Thanks for the update. -
Benni Mack uploaded patch set 4
CR +1V +110/01/26, 08:39 -
Benni Mack marked it ready for review 10/01/26, 08:47
-
core-ci voted on patch set 4 V +1 10/01/26, 08:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109770