-
Notifications
You must be signed in to change notification settings - Fork 480
feat(UVE): Broken Content Navigation on Relative Path/URL #34175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(UVE): Broken Content Navigation on Relative Path/URL #34175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes broken content navigation when using relative paths/URLs in the Universal Visual Editor (UVE) by injecting a <base> tag into rendered HTML pages. When pages are displayed in iframes without a base tag, relative links fail to resolve correctly, breaking navigation. The solution dynamically calculates and injects an appropriate base href to ensure relative URLs resolve properly within the iframe context.
Key Changes
- Added
getBaseHrefFromPageURI()utility to compute the correct base href from a page URI and origin - Added
injectBaseTag()utility to inject base tags into HTML when missing - Integrated base tag injection into the VTL code injection pipeline in
EditEmaEditorComponent
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
core-web/yarn.lock |
Cleanup of duplicate and wildcard dependency entries for better deterministic resolution |
core-web/libs/portlets/edit-ema/portlet/src/lib/utils/index.ts |
Added base tag helper functions to compute and inject base tags into HTML |
core-web/libs/portlets/edit-ema/portlet/src/lib/utils/utils.spec.ts |
Added comprehensive unit tests for the new base tag helper functions |
core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts |
Integrated base tag injection into the VTL code injection pipeline |
core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.spec.ts |
Added test to verify base tag injection is called with correct parameters |
We’re porting this behavior from the old editor. See the relevant implementation here:
dot-edit-content-html.service.ts (lines 921–946)
Videos
Issue
issue.mov
Fix
video.mov
This PR fixes: #34174
This PR fixes: #34174