Repository navigation
[Grid] Fix locale fallback and null export for advanced column source fields - #2071
Merged
Merged
Conversation
… fields An advanced column's source fields jumped to the class's default language whenever a transformer was attached, ignoring the configured fallback chain the same field used without a transformer; a missing value also exported as the literal string "null". Both now resolve export-consistently regardless of the transformer pipeline, while the interactive grid's own plain-column fallback display is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAUDMygVFT6TNKHvscT7rC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approved
Static review found no blocking issues in fallback isolation, context restoration, or null handling; tests were not executed.
Review effort: Balanced
Findings: None
What changed in this PR
Aligns advanced-column source-field localization with export behavior while preserving plain grid columns’ default-language fallback.
Changes:
- Adds shared source-field context to control the extra default-language fallback.
- Exports missing values as empty strings while preserving nested JSON nulls.
- Adds regression tests and upgrade notes.
| File | Description |
|---|---|
| tests/Unit/Grid/Util/Trait/LocalizedValueTraitTest.php | Tests fallback behavior. |
| tests/Unit/Grid/Util/AdvancedColumnSourceFieldContextTest.php | Tests context state tracking. |
| tests/Unit/Grid/Column/Resolver/DataObject/AdvancedColumnResolverTest.php | Tests source context and export values. |
| tests/Unit/Grid/Column/Resolver/DataObject/AdapterResolverTest.php | Tests context-dependent fallback control. |
| src/Grid/Util/Trait/LocalizedValueTrait.php | Adds a default-language fallback hook. |
| src/Grid/Util/AdvancedColumnSourceFieldContextInterface.php | Defines the source-resolution context contract. |
| src/Grid/Util/AdvancedColumnSourceFieldContext.php | Stores source-resolution state. |
| src/Grid/Column/Resolver/DataObject/AdvancedColumnResolver.php | Scopes context and handles null exports. |
| src/Grid/Column/Resolver/DataObject/AdapterResolver.php | Suppresses extra fallback for source fields. |
| doc/02_Installation_and_Configuration/05_Upgrade.md | Documents behavior changes. |
| config/grid.yaml | Registers the shared context service. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The interactive grid keeps its default-language fallback. Adds a regression test wiring a real AdapterResolver, plus flag-restore tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Split out of #2064.
''instead of the string"null".Regression test wires a real
AdapterResolverunderAdvancedColumnResolverand fails without the fix.Verified end to end (demo, 2026.3 + pimcore/studio-ui-bundle#4166)
CSV export of the Car grid in
de, advanced column onnamewith a Trim transformer, cars without a German name ("before" = 2026.3, "after" = this branch):Name (de)Name advanced (de)beforeE-Type(English)defalls back tofr(French name set)Type E (fr)Type E (fr)Type E (fr)defalls back tofr, no French nameMK2(English)"null"export, advanced column ondescription(empty in every language) with Trim, CSV and XLSX inde:null/null🤖 Generated with Claude Code