[5.x]: No Color option not appear as card attribute in Matrix View Mode Card

Aperta
#20,382 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
63/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
php
Ambito
backend

Direzione di ricerca

Start by tracing how Matrix card attributes render a Color field when it has no selected value, then compare that path with the rendering of a populated Color field. The report identifies Card Attributes and the native “No Color” state, but names no source files or tests. Done means the card shows an attribute or empty state for an unset Color field.

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

Descrizione

bug repo:cms
What happened?
Description

When using the Card layout for a Matrix field, if an entry includes a Color field that is left unset (defaulting to the native "No Color" option), this state cannot be displayed as a Card Attribute.

Because the "No Color" option cannot be manually removed or replicated as a custom value, there is currently no way to let content editors see at a glance on the card preview that the color has been left empty/unset.

Steps to reproduce
  1. Create a Color field. Leave it optional so the native "No Color" option acts as the default.
  2. Create an entry type used inside a Matrix field, and add this Color field to it.
  3. Under Card Attributes, choose to display the Color field.
  4. In the Matrix field's field settings, change the view mode to Cards.
  5. Create an entry, leave the Color field as "No Color", and save.
Expected behavior

The card preview in the Matrix field should display an attribute indicator showing that "No Color" (or an empty state indicator) is selected.

Actual behavior

The attribute does not appear on the card at all when "No Color" is selected, making it look as though the field doesn't exist or isn't being tracked on the card layout.

Image Image Image Image
Craft CMS version

5.11.3 && 5.12.0.1

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
712
Merge medio
12h 44m
PR unite (30g)
381

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.