[Bug, EC] PEES-1178: (Object) Relations to "folder" result in an exception in grid view#1951
Conversation
Up to standards ✅🟢 Issues
|
| Category | Results |
|---|---|
| CodeStyle | 14 minor |
🟢 Metrics 15 complexity
Metric Results Complexity 15
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Object relations that allow linking to folders included the "folder" pseudo-class when resolving class definitions, causing an exception in grid view since folders have no class definition to look up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2c3da36 to
8eae019
Compare
There was a problem hiding this comment.
Pull request overview
Fixes a grid-view exception caused by object relation class resolution attempting to resolve the "folder" pseudo-class (which has no class definition). This adds explicit skipping of the folder pseudo-class in the relevant grid configuration building paths, and introduces unit tests to prevent regressions.
Changes:
- Skip the
"folder"pseudo-class when resolving relation class definitions for available column configurations. - Skip the
"folder"pseudo-class when collecting relation-field metadata for advanced grid columns. - Add unit tests covering folder-only relations and folder+real-class relations.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Grid/Service/ColumnConfigurationForRelationService.php |
Skips the folder pseudo-class while resolving relation class definitions for column configuration lookup. |
src/Grid/Column/Collector/DataObject/AdvancedColumnCollector.php |
Skips the folder pseudo-class when building relation-field configs for advanced columns. |
tests/Unit/Grid/Service/ColumnConfigurationForRelationServiceTest.php |
Adds a unit test ensuring folder pseudo-class is ignored during relation column configuration resolution. |
tests/Unit/Grid/Column/Collector/DataObject/AdvancedColumnCollectorTest.php |
Adds unit tests ensuring folder pseudo-class is ignored in relation-field collection, including mixed folder+real class scenarios. |
…lution getByName() can return null for any class name that no longer resolves (not just the "folder" pseudo-class), which previously caused a fatal error when calling ->getId() on the result. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Good point! Changed it! |



Object relations that allow linking to folders included the "folder" pseudo-class when resolving class definitions, causing an exception in grid view since folders have no class definition to look up.
Changes in this pull request
Resolves #850