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

オープン
#20,382 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
63/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
PHP
スター
3.6k
フォーク
712
平均マージ
12時間 44分
マージ済み PR(30日)
381

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

craftcms/cms のほかの issue

craftcms/cms の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。