Require parentDocumentId for renderlet render endpoint - #1999
Conversation
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>
|
There was a problem hiding this comment.
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.
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: 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 |



The renderlet render endpoint only resolved and applied the parent document's attributes (including the content document) when a
parentDocumentIdquery 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
RenderletParameterTestcovering the now-required parameterRenderletServiceTestcovering that the parent document's attributes are forwardedvendor/bin/codecept run Unit Document/passesvendor/bin/phpstan analyseclean on touched files