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

Đang mở Phù hợp với người mới
#38,684 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi

Hướng nghiên cứu

Bắt đầu với edit_contentlet_js_inc.jsp quanh các dòng 686–698 và trình xử lý close trong dot-contentlet-wrapper.component.ts quanh các dòng 80–86; so sánh với trình xử lý edit-page được Open (preview) sử dụng. Theo dõi cách mã định danh site của trang mới khả dụng khi sự kiện close được gửi. Hoàn tất khi việc lưu một trang mới mở UVE với host_id, đồng thời việc chỉnh sửa trang hiện có và chuyển hướng khi đổi ngôn ngữ vẫn hoạt động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Java
Star
972
Fork
493
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
228

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotCMS/core

Tất cả issue của dotCMS/core

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.