Skip to content

[5.x]: Button group cannot have an option label or value of '0' #17225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Antimated opened this issue May 6, 2025 · 1 comment
Closed

[5.x]: Button group cannot have an option label or value of '0' #17225

Antimated opened this issue May 6, 2025 · 1 comment
Assignees
Labels

Comments

@Antimated
Copy link

What happened?

Description

Creating a button group with the option label with the value of 0 does not display the number 0.

Before and after save
Image

How the field looks after save
Image

Creating a button group with the value of 0 removes the icon after save.
Before save
Image

After save (note the first option)
Image

How the field looks after save
Image

Expected behavior

  • Displaying the label and/or icon correctly if the label or value is 0

Actual behavior

  • Strips away the value

Craft CMS version

Craft Pro 5.7.4

PHP version

8.2.28

Operating system and version

Darwin 24.4.0

Database type and version

MySQL 8.0.36

Image driver and version

Imagick 3.8.0 (ImageMagick 7.1.1-45)

Installed plugins and versions

  • CKEditor: 4.8.0
  • Cookies: 5.0.0
  • CP Field Inspect: 2.0.4
  • Craft Commerce: 5.3.11
  • Formie: 3.0.27
  • Hyper: 2.2.5
  • Icon Picker: 3.0.4
  • Ray: 2.1.1
  • SEOmatic: 5.1.13
  • Translations: 4.1.1
  • Vite: 5.0.1
@Antimated Antimated added the bug label May 6, 2025
@brandonkelly brandonkelly self-assigned this May 6, 2025
@brandonkelly
Copy link
Member

Thanks for reporting that! Craft 5.7.5 is out with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants