feat(dot-page-api): add depth parameter handling in DotPageApiService#36412
Conversation
## Summary Enhances the DotPageApiService to always include a depth parameter in API requests, ensuring relationship data is not omitted. Introduces a default depth value and allows explicit depth values to be passed by the caller. ## Changes - Updated API request URLs in unit tests to include the depth parameter. - Modified the get method to set a default depth if none is provided. - Added a test case to verify that explicit depth values are respected. Closes #XXXX (replace with relevant issue number if applicable)
|
Claude finished @KevinDavilaDotCMS's task in 1m 24s —— View job Rollback-Safety Analysis ✅
Result: Safe to rollback. This PR is a frontend-only (TypeScript/Angular) change, scoped to
None of the unsafe categories apply:
Rolling back to N-1 simply reverts to the (buggy) behavior of omitting Label applied: |
🤖 dotBot Review (Bedrock)Reviewed 4 file(s); 0 candidate(s) → 0 confirmed, 0 uncertain (unverified, kept for review). ✅ No issues found after verification. us.deepseek.r1-v1:0 · Run: #28627064421 · tokens: in: 9043 · out: 2155 · total: 11198 · calls: 4 · est. ~$0.024 |
## Summary Enhances the EditEmaEditorComponent by introducing a check for client queries when rendering headless pages. This prevents REST-sourced page assets from being pushed into the iframe, ensuring that only GraphQL-backed updates are processed. ## Changes - Added a variable to determine if the client has a valid query. - Implemented a conditional return to skip iframe content loading for headless pages without a client query. This change improves the integrity of the content rendering process in headless scenarios.
❌ Linked Issue Needs Team LabelThis PR is linked to issue #36410, but that issue has no How to fix this:Apply a This comment was automatically generated by the issue linking workflow |
Problem
UVE's REST page fetch stopped sending
depth. Backend skips relationship expansion entirely without it. Headless clients got that incomplete data pushed into their iframe, crashing onundefinedrelationship fields.Fix 1 — Restore
depthon RESTFiles:
dot-page-api.service.ts,consts.tsDotPageApiService.get()now always sendsdepth, defaulting to'0'— the exact value used before the Feb 2025 regression.depthvalues still win.Fix 2 — Don't push REST data to a headless iframe
File:
edit-ema-editor.component.tspostMessagepush to headless clients now waits forrequestMetadata(the client's GraphQL query) to exist.CLIENT_READYarrives, the same effect re-fires and pushes correct GraphQL data.Why both
depthdefaultFix 2 doesn't replace Fix 1 — traditional never goes through Fix 2's check.
Tests
pnpm nx test portlets-edit-ema-portlet→ 1310 passed, 0 failed.Known gaps
depth=0resolves one relationship level only (matches historical behavior).