fix: add rootLevel to provider, configuration, and model TCA - #101
Conversation
Records created on pid=0 (e.g. by Setup Wizard) were invisible to FormEngine select queries because AbstractItemProvider joins against the pages table. Adding rootLevel=-1 allows records on both root level and regular pages, matching tx_nrllm_task. Fixes #100 Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where TYPO3's FormEngine failed to display options in select dropdowns for records stored at Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Automated approval for solo maintainer project
This PR has passed all automated quality gates:
- ✅ Static analysis (PHPStan)
- ✅ Code style (PHP-CS-Fixer)
- ✅ Unit & functional tests
- ✅ Security scanning
- ✅ Dependency review
See SECURITY_CONTROLS.md for compensating controls documentation.
There was a problem hiding this comment.
Code Review
This pull request adds the 'rootLevel' => -1 setting to the TCA configuration for providers, configurations, and models, which is crucial for correctly resolving records stored on the root page (pid=0) in backend forms by preventing TYPO3 from adding a JOIN pages constraint. No security vulnerabilities were found, and the implementation appears consistent and correct, directly addressing the described issue.
There was a problem hiding this comment.
Pull request overview
Adds missing TYPO3 TCA ctrl.rootLevel configuration for the extension’s root-level records so FormEngine foreign-table selects work when records are stored at pid=0 (matching the existing tx_nrllm_task behavior), addressing issue #100.
Changes:
- Add
'rootLevel' => -1totx_nrllm_providerTCActrl - Add
'rootLevel' => -1totx_nrllm_configurationTCActrl - Add
'rootLevel' => -1totx_nrllm_modelTCActrl
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Configuration/TCA/tx_nrllm_provider.php | Allows provider records at root level so dependent selects don’t go empty for pid=0 records. |
| Configuration/TCA/tx_nrllm_model.php | Allows model records at root level to be discoverable in backend select fields. |
| Configuration/TCA/tx_nrllm_configuration.php | Allows configuration records at root level to populate task/config selects correctly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Fixes #100. Adds
'rootLevel' => -1to the TCActrlsection fortx_nrllm_provider,tx_nrllm_configuration, andtx_nrllm_model, matching the existing configuration intx_nrllm_task.Root Cause
TYPO3's FormEngine
AbstractItemProvideradds aJOIN pagesconstraint when resolving foreign table items. Records onpid=0have no matchingpagesrow, causing all select dropdowns to return empty results.Changes
'rootLevel' => -1to 3 TCA filesTest plan