[DEFECT] UVE: Redirect to a new tab is not working in Edit Page Mode links
Problem Statement
Current Behavior When working within the “Edit Mode of a Page“ in the Admin Panel, clicking on hyperlinks that target a new tab results in the destination page opening in a blank state.
Although the new tab opens and the URL in the address bar is correct, the content does not render (white screen). If you click the browser's "Reload/Refresh" button you get the same blank page.
The content only loads if the user manually clicks into the URL address bar and presses Enter. This suggests a potential issue with the referrer policies, or how the dotCMS handles anchor tag events in the backend UI.
This issue is isolated to the Edit/Admin Mode. The same links function correctly (loading immediately) when accessed from the live, published page.
Steps to Reproduce
- Log in to the dotCMS admin and enter "Edit Mode" for a page.
- Locate a link configured to open in a new tab (
target="_blank"). Could be one of the links in the Copy URL options. - Click the link.
- Observe that the new tab opens with the correct URL but displays a blank white page.
- Attempt to refresh the page using the browser refresh button (Page remains blank).
- Click into the URL bar and press Enter (Page loads successfully).
https://github.com/user-attachments/assets/54d9c8a3-5174-4672-a824-ee502d7cca6f
Acceptance Criteria
- [ ] Immediate Loading: Clicking a link in "Edit Mode" must open the new tab and render the content immediately without user intervention.
- [ ] No Manual Trigger Required: The user should not be required to focus the URL bar or press Enter to trigger the page load.
- [ ] Preserve Live Functionality: Any fix implemented for the Admin panel must not negatively impact link behavior on the live/public-facing site.
dotCMS Version
Main/trunk
Severity
Low - Minor issue or cosmetic
Update on Blank Page Issue in "Edit Mode"
The Fix Implemented:
To resolve the issue where links open a blank page when we click on them in the Admin Panel "Edit Mode," I have added the rel="noreferrer noopener" attribute (draft pr). This successfully fixes the issue for all content controlled via the frontend editor, for now it only affects the copy URL functionality.
Remaining Scope (VTL Files): The issue persists for hardcoded links within our VTL (Velocity Template) files. These links still trigger the blank page behavior when we open them in a new tab (rare scenario) in Edit Mode.
Recommendation:
I propose not extending this fix to every VTL file at this time.
Low Impact: It is a rare edge case for a client to need to open in a new tab a link defined in the VTL while editing page content.
High Effort: Manually updating every tag across all VTL files would require significant time for very little functional gain.
Unless there is a critical need to support navigation via template links during editing, I believe the current frontend-only fix is sufficient.
Video with visual explanation of the solution and remaining scope.
https://github.com/user-attachments/assets/1e19f5d8-7f09-4ac2-8c5d-41697c9aaea7
Passed QA
- dotCMS Docker Image: [
dotcms/dotcms:trunk_c75b227]
Video
https://github.com/user-attachments/assets/e9b04a7f-7b47-49a6-a457-36b188e04f70