Include host_id when opening the UVE after creating a page in the legacy content editor

オープン 初心者向け
#38,684 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, javascript, typescript

調査の方向性

edit_contentlet_js_inc.jsp の686~698行付近と、dot-contentlet-wrapper.component.ts の80~86行付近にある close ハンドラーから始め、Open (preview) で使われている edit-page ハンドラーと比較してください。close イベントの送信時に、新しいページのサイト識別子をどのように利用できるか追跡してください。新しいページを保存すると host_id を指定して UVE が開き、既存ページの編集と、言語変更時のリダイレクトも引き続き機能すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

dotCMS : UVE OKR : Customer Support Team : Maintenance Type : Defect
Problem Statement

After a new HTML page is created and saved in the legacy content editor, dotCMS opens the page in the UVE with url and language_id but no host_id. Opening the same page from Site Browser with Open (preview) does include host_id.

Headless front ends that use host_id to recognize UVE requests and choose their rendering and iframe policy (for example a frame-ancestors CSP) treat the post-creation request as a normal page request. The page is then blocked inside the editor iframe. Multi-site setups can't reliably fall back to a fixed site ID.

Cause: for a new page, edit_contentlet_js_inc.jsp (~L686-698) sends a close event with only redirectUrl and languageId. The close handler in dot-contentlet-wrapper.component.ts (~L80-86) calls goToEditPage({ url, language_id }) with no host_id. The edit-page handler in the same component, used by Open (preview), passes host_id: data.hostId.

Steps to Reproduce
  1. In dotCMS admin, create a new HTML page with the legacy content editor and save it.
  2. Inspect the UVE route and the page URL loaded in the editor iframe: host_id is missing.
  3. Open the same page from Site Browser > Open (preview).
  4. Inspect the UVE route again: host_id is present.
Acceptance Criteria
  • Saving a new page in the legacy content editor opens the UVE with host_id set to the new page's site identifier.
  • The post-creation UVE URL has the same site context as Open (preview).
  • Existing-page edits and language-change redirects keep working as they do now.
dotCMS Version

26.09.28-02 (also present on main)

Severity

Medium - Some functionality impacted

Links
主要言語
Java
スター
972
フォーク
493
平均マージ
2日 12時間
マージ済み PR(30日)
228

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotCMS/core のほかの issue

dotCMS/core の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。