Skip to content

fix: add rootLevel to provider, configuration, and model TCA - #101

Merged
CybotTM merged 1 commit into
mainfrom
fix/tca-rootlevel
Mar 6, 2026
Merged

fix: add rootLevel to provider, configuration, and model TCA#101
CybotTM merged 1 commit into
mainfrom
fix/tca-rootlevel

Conversation

@CybotTM

@CybotTM CybotTM commented Mar 6, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #100. Adds 'rootLevel' => -1 to the TCA ctrl section for tx_nrllm_provider, tx_nrllm_configuration, and tx_nrllm_model, matching the existing configuration in tx_nrllm_task.

Root Cause

TYPO3's FormEngine AbstractItemProvider adds a JOIN pages constraint when resolving foreign table items. Records on pid=0 have no matching pages row, causing all select dropdowns to return empty results.

Changes

  • Added 'rootLevel' => -1 to 3 TCA files

Test plan

  • All tests pass
  • Manual: edit a task — configuration dropdown shows options
  • Manual: edit a configuration — model dropdown shows options
  • Manual: edit a model — provider dropdown shows options

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>
Copilot AI review requested due to automatic review settings March 6, 2026 11:24
@CybotTM
CybotTM added this pull request to the merge queue Mar 6, 2026
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, 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 pid=0. The problem stemmed from a JOIN pages constraint applied by AbstractItemProvider, which prevented records without a corresponding pages entry from being resolved. By introducing 'rootLevel' => -1 to the TCA ctrl sections of the affected tables, the system is now correctly configured to find these root-level records, ensuring proper functionality of related dropdowns.

Highlights

  • TCA Configuration Update: Added 'rootLevel' => -1 to the 'ctrl' section of tx_nrllm_provider, tx_nrllm_configuration, and tx_nrllm_model TCA files, aligning their configuration with tx_nrllm_task.
Changelog
  • Configuration/TCA/tx_nrllm_configuration.php
    • Added 'rootLevel' => -1 to the 'ctrl' section.
  • Configuration/TCA/tx_nrllm_model.php
    • Added 'rootLevel' => -1 to the 'ctrl' section.
  • Configuration/TCA/tx_nrllm_provider.php
    • Added 'rootLevel' => -1 to the 'ctrl' section.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions github-actions Bot added the configuration Configuration changes label Mar 6, 2026
@github-actions

github-actions Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Merged via the queue into main with commit 212c815 Mar 6, 2026
39 checks passed
@CybotTM
CybotTM deleted the fix/tca-rootlevel branch March 6, 2026 11:24

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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' => -1 to tx_nrllm_provider TCA ctrl
  • Add 'rootLevel' => -1 to tx_nrllm_configuration TCA ctrl
  • Add 'rootLevel' => -1 to tx_nrllm_model TCA ctrl

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration Configuration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: TCA missing rootLevel for provider, configuration, and model tables

2 participants