Skip to content

Require parentDocumentId for renderlet render endpoint - #1999

Open
robertSt7 wants to merge 1 commit into
2026.2from
fix/renderlet-parent-document-editmode
Open

Require parentDocumentId for renderlet render endpoint#1999
robertSt7 wants to merge 1 commit into
2026.2from
fix/renderlet-parent-document-editmode

Conversation

@robertSt7

@robertSt7 robertSt7 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The renderlet render endpoint only resolved and applied the parent document's attributes (including the content document) when a parentDocumentId query parameter happened to be present. Since the frontend always has a parent document available in edit mode, this makes the parameter required so the content document is always attached to the rendered sub-request.

Companion fix: pimcore/studio-ui-bundle#3994
Related: pimcore/service-operations#848

Test plan

  • Added RenderletParameterTest covering the now-required parameter
  • Added RenderletServiceTest covering that the parent document's attributes are forwarded
  • vendor/bin/codecept run Unit Document/ passes
  • vendor/bin/phpstan analyse clean on touched files

The renderlet render endpoint only resolved and applied the parent
document's attributes (including the content document) when a
parentDocumentId query parameter happened to be present. Since the
frontend always has a parent document available in edit mode, make
the parameter required so the content document is always attached to
the rendered sub-request.

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

Makes parentDocumentId mandatory so renderlets consistently inherit parent document attributes.

Changes:

  • Requires and validates a positive parent document ID.
  • Always resolves parent document attributes during rendering.
  • Updates OpenAPI metadata and adds unit coverage.

Reviewed changes

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

Show a summary per file
File Description
src/Document/Controller/Renderlet/RenderController.php Marks the query parameter as required.
src/Document/MappedParameter/RenderletParameter.php Requires a positive parent document ID.
src/Document/Service/RenderletService.php Always loads parent document attributes.
tests/Unit/Document/MappedParameter/RenderletParameterTest.php Tests the required parameter and getter.
tests/Unit/Document/Service/RenderletServiceTest.php Tests forwarding the content document attribute.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Install dependencies with Composer

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

@robertSt7 robertSt7 added the Bug label Aug 18, 2026
@robertSt7 robertSt7 self-assigned this Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants