UVE: Firefox shows "about:srcdoc" error in the canvas when a traditional page assigns window.location
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- java, javascript
調査の方向性
Start in dot-uve-iframe.component.ts and trace insertPageContent, where traditional page HTML is written to the canvas iframe's srcdoc. Reproduce the Firefox failure using the steps in the issue, then inspect how the editor handles iframe navigation and hash-only navigation. Done means assigned window.location no longer leaves the Firefox canvas on an error page, while reload, hash handling, and Chromium behavior still meet the acceptance criteria.
索引モデルが issue の本文から書いたものです。
説明
Problem Statement
In Firefox, when a traditional (VTL) page is open in the Universal Visual Editor and a script on the page navigates by assigning window.location / window.location.href (for example to the current URL with added query-string parameters), the editor canvas is replaced by Firefox's own "Hmm. That address doesn't look right." error page ("Firefox can't connect to the server at about:srcdoc"). Editors have to refresh the browser tab to get the page back.
UVE renders traditional pages by writing the server-rendered HTML into the canvas iframe's srcdoc (dot-uve-iframe.component.ts, insertPageContent, introduced by #36583). Inside that iframe the document's location is about:srcdoc, so a page script that builds a navigation from window.location targets about:srcdoc, which Firefox treats as an invalid address.
A common real-world trigger is a cookie/privacy consent banner that, after the visitor clicks "Accept", writes the consent cookie and then navigates to the current URL (often with extra query parameters) so consent-dependent scripts are rendered. The same applies to any page script that navigates itself (language/region switchers, JS redirects). Sites migrating from the 5.x Edit Mode, which loaded the page by its real URL, did not hit this.
Impact: editors only (live site visitors are unaffected), on first access before the consent cookie exists, every time. It reads to editors as a backend malfunction.
Browsers: Firefox only. Chrome and Chromium-based browsers handle the same navigation without the error. Per the reporter, location.reload() works in Firefox too; the failure is on assignment to window.location / window.location.href.
Steps to Reproduce
- Open the dotCMS demo site (demo.dotcms.com) in Firefox and log in to the backend.
- Open any traditional page (e.g.
/index) in the Page Editor (UVE). - Open the browser developer tools (F12) → Console, and switch the JavaScript context selector to the canvas iframe (
about:srcdoc). - Run:
window.location.href = window.location - Observe: the canvas shows Firefox's "Hmm. That address doesn't look right." / "can't connect to the server at about:srcdoc" page instead of the page content. Only a full browser-tab refresh restores the editor.
- Repeat steps 1–4 in Chrome: the canvas does not break.
Real-world variant: add a script to a page template that, on a button click, sets a cookie and then sets window.location.href to the current URL plus a query parameter; clear cookies; open the page in UVE in Firefox and click the button.
Acceptance Criteria
- In Firefox, a traditional page in UVE that assigns
window.location/window.location.href(to its own URL, with or without added query parameters) does not leave the canvas on a browser error page; the editor keeps or reloads the page in the current editor mode. - Behavior in Chrome/Chromium-based browsers is unchanged.
-
location.reload()from page scripts continues to work in all supported browsers. - Hash-only navigation (
#section) keeps its current in-canvas scroll handling.
dotCMS Version
dotEvergreen, current release (reproduced on demo.dotcms.com). Traditional pages have rendered through srcdoc since #36583.
Severity
Medium - Some functionality impacted
Links
- Freshdesk ticket #41459
- Related (closed): #37961 (consent-banner buttons in the UVE canvas)
- 主要言語
- Java
- スター
- 972
- フォーク
- 493
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 228
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotCMS/core のほかの issue
-
dotCMS : UVE OKR : Customer Support Team : Maintenance Type : Defect
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
OKR : Customer Support Team : Maintenance Type : Defect
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
Opening content from Content Search replaces the "Search" breadcrumb in the new Edit Content screenオープンdotCMS: New Edit Contentlet OKR : Customer Support Team : Falcon Type : Defect
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
Escape the Binary field hint in the legacy content editor so an apostrophe doesn't break the fieldオープンOKR : Customer Support Team : Maintenance Type : Defect
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 2 日以内に返信
-
dotCMS : Permissions OKR : Customer Support Team : Maintenance Type : Defect
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
desktop grp:about type:graphics-bug ui-public
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
it-at-m/Wahllokalsystem#3846 ·
メンテナーはふだん 2 日以内に返信
-
Area/Connector module/solace Priority/Low Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
ballerina-platform/ballerina-library#9849 ·
メンテナーはふだん 1 日以内に返信