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

未关闭 适合新手
#38,684 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃

调研方向

从 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 小时
30 天内合并 PR
228

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dotCMS/core 的其他 Issue

查看 dotCMS/core 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。