Skip to content

[Bug, EC] PEES-1178: (Object) Relations to "folder" result in an exception in grid view#1951

Merged
jcPimcore merged 2 commits into
2026.2from
850-bug-ec-object-relations-to-folder-result-in-an-exception-in-grid-view
Jul 15, 2026
Merged

[Bug, EC] PEES-1178: (Object) Relations to "folder" result in an exception in grid view#1951
jcPimcore merged 2 commits into
2026.2from
850-bug-ec-object-relations-to-folder-result-in-an-exception-in-grid-view

Conversation

@jcPimcore

Copy link
Copy Markdown
Contributor

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

@codacy-production

codacy-production Bot commented Jul 15, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 14 minor

Results:
14 new issues

Category Results
CodeStyle 14 minor

View in Codacy

🟢 Metrics 15 complexity

Metric Results
Complexity 15

View in Codacy

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>
@jcPimcore
jcPimcore force-pushed the 850-bug-ec-object-relations-to-folder-result-in-an-exception-in-grid-view branch from 2c3da36 to 8eae019 Compare July 15, 2026 13:07
@jcPimcore jcPimcore self-assigned this Jul 15, 2026
@jcPimcore jcPimcore added the Bug label Jul 15, 2026
@jcPimcore jcPimcore added this to the 2026.2.1 milestone Jul 15, 2026
@jcPimcore
jcPimcore requested a review from Copilot July 15, 2026 13:12

Copilot AI 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.

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.

Comment thread src/Grid/Service/ColumnConfigurationForRelationService.php Outdated
…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>
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@jcPimcore
jcPimcore requested a review from martineiber July 15, 2026 13:38

@martineiber martineiber 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.

Base branch is 2026.x and the Minestrone is 2026.2.1, what is correct?

@jcPimcore
jcPimcore changed the base branch from 2026.x to 2026.2 July 15, 2026 13:50
@jcPimcore

Copy link
Copy Markdown
Contributor Author

Base branch is 2026.x and the Minestrone it 2026.2.1 what is correct?

Good point! Changed it!

@martineiber martineiber 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.

LGTM

@jcPimcore
jcPimcore merged commit ff3e590 into 2026.2 Jul 15, 2026
14 checks passed
@jcPimcore
jcPimcore deleted the 850-bug-ec-object-relations-to-folder-result-in-an-exception-in-grid-view branch July 15, 2026 13:55
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants