cms icon indicating copy to clipboard operation
cms copied to clipboard

[5.x]: First color option doesn't save in Color field

Open janreges opened this issue 8 months ago • 1 comments

What happened?

Description

When using the Color field in Craft CMS 5.7.5, selecting the first color in the palette and saving the entry does not persist the color value. The field remains empty after save and reload. However, selecting any other color in the palette works correctly and persists after saving.

Steps to reproduce

  1. Create a new Color field in your Craft CMS setup
  2. Configure the color field with a palette of colors and disable custom colors. No color is defined as default.
  3. Add this field to a field layout (e.g., for a category group)
  4. Edit an entry with this field
  5. Select the first color in the palette
  6. Save the entry
  7. Reload the entry edit page

Expected behavior

The selected color (first in the palette) should be saved and displayed when the entry is reloaded, just as when selecting any other color in the palette.

Actual behavior

After saving the entry with the first color selected and reloading the page, the color field appears empty again.

Craft CMS version

5.7.5

PHP version

8.3.17

Operating system and version

Linux 5.15.167.4-microsoft-standard-WSL2

Database type and version

MySQL 8.0.40

Image driver and version

Imagick 3.7.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

  • Amazon S3 2.2.2
  • Blitz 5.10.5
  • Campaign 3.5.11
  • CKEditor 4.8.0
  • Cloudflare R2 1.1.1
  • Content Buddy 1.2.5
  • CP Field Inspect 2.0.4
  • Formie 3.0.27
  • Icon Picker 3.0.4
  • Imager X 5.1.3
  • Imager X Power Pack 1.0.5
  • Matrix Block Anchor 2.0.1
  • Navigation 3.0.8
  • Super Table 4.0.4
  • Typogrify 5.0.1

janreges avatar May 10 '25 16:05 janreges

Hi, thanks for getting in touch! I’m not able to reproduce this behaviour. Could you please turn on the safeMode and see if the issue persists?

i-just avatar May 12 '25 09:05 i-just