Skip to content
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

[4.x]: Field type checkboxes throws error when saving #14340

Closed
MatthiasBrodelet opened this issue Feb 9, 2024 · 1 comment
Closed

[4.x]: Field type checkboxes throws error when saving #14340

MatthiasBrodelet opened this issue Feb 9, 2024 · 1 comment

Comments

@MatthiasBrodelet
Copy link

What happened?

Description

I have a Product Type in Craft Commerce that contains a field of type Checkboxes.
This field contains 3 options of which 2 are by default selected.
When I try to save the product I get the following error: strtolower(): Argument #1 ($string) must be of type string, array given.

I'm pretty sure the checkboxes are the reason for the problem because when I remove them from the product type entry I can save the product without issues.
Also the base64 values in the error match the values of the checkboxes.
More info can be found in the attached screenshots.

Steps to reproduce

  1. Create a checkbox field
  2. Add it to a product type entry
  3. Try to save the product

Expected behavior

The product should save without errors on the checkboxes.

Actual behavior

The product can't be saved.

Screenshot 2024-02-09 at 14 49 16
Screenshot 2024-02-09 at 14 52 37

Craft CMS version

4.7.2

PHP version

8.1.18

Operating system and version

Linux 6.3.13-linuxkit

Database type and version

MySQL 5.7.29

Image driver and version

Imagick 3.7.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

  • Craft commerce
@i-just
Copy link
Contributor

i-just commented Feb 9, 2024

Hi, thanks for reaching out! This was previously reported here: #14326 and fixed in 4.7.2.1. If you update to that version, it should start working as expected.

@i-just i-just closed this as completed Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants