Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[6.x]: Relation fields with "Maintain hierarchy" show selected elements as a flat list in the entry editor

Đang mở
#20,171 1 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 1 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php
Lĩnh vực
frontend

Hướng nghiên cứu

Start by tracing how the entry editor renders selected elements for Entries relation fields with “Maintain hierarchy” enabled, then compare that path with the Craft 5 nested display described in the issue. Reproduce with a parent and child entry in a structure section; done when the child is visibly indented beneath its parent while hierarchy behavior remains intact.

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

Mô tả

bug repo:cms
What happened?

Description

In Craft 5, a relation field with "Maintain hierarchy" enabled showed the selected elements nested, with indentation and branch lines. In Craft 6 the field still enforces hierarchy (it fills gaps and applies the branch limit), but the selected elements are drawn as a flat list.

Steps to reproduce

  1. Create a structure section with a parent entry and a child entry, for example "News" and "Club news" below it.
  2. Create an Entries relation field with that section as its source and "Maintain hierarchy" turned on.
  3. Add the field to an entry type, edit an entry, and select both the parent and the child.
  4. Save and look at the field in the entry editor.

Expected behavior

The child is shown nested under the parent, with indentation as in Craft 5.

Actual behavior

The parent and the child are stacked chips with identical indentation. Nothing shows the child's level, even though the database has the child at level 2 in structureelements.

Craft CMS version

6.x-dev @ 7c6ece5ff9ebcd0ff2380d545ae822c0502c715c

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions
Ngôn ngữ chính
PHP
Star
3.6k
Fork
710
Merge trung bình
12 giờ 44 phút
Pull request đã merge (30 ngày)
335

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

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 craftcms/cms

Tất cả issue của craftcms/cms

Issue tương tự

Thêm issue về PHP

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.