Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#20,171 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
php
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
PHP
Stelle
3.6k
Fork
710
Merge medio
12h 44m
PR unite (30g)
335

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di craftcms/cms

Tutte le issue di craftcms/cms

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.