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]: "validateCartCustomFieldsOnSubmission" no longer works after updating to CraftCMS v4.4 #3109

Closed
jonleverrier opened this issue Mar 10, 2023 · 4 comments
Assignees
Labels
bug commerce4 Issues related to Commerce v4

Comments

@jonleverrier
Copy link

jonleverrier commented Mar 10, 2023

What happened?

Description

Since updating to CraftCMS v4.4.0, when "validateCartCustomFieldsOnSubmission" is set to "true", it no longer validates custom fields on update cart in the front-end. It was working fine before updating.

Steps to reproduce

  1. Add a "plain text" field to Commerce > System Settings > Order Fields
  2. Make it required
  3. Make sure the custom "plain text" field is included somewhere in your checkout workflow which is wrapped in a commerce/cart/update-cart form
  4. Browse to the step where the "plain text" field is included, leave blank and try and proceed to the next step
  5. You will be able to proceed to the next step. No validation errors reported.

Expected behavior

When custom fields are added to Order Fields and validateCartCustomFieldsOnSubmission is set to "true", on the front-end, they should show errors if for example, they are left blank.

Actual behavior

No validation errors are reported in the front-end when custom fields are added to Order Fields and set to required.

Craft CMS version

v4.4.0

Craft Commerce version

v4.2.5.1

PHP version

8.0.21

Operating system and version

Linux 5.15.49-linuxkit

Database type and version

MySQL 10.4.25

Image driver and version

Imagick 3.6.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

@jonleverrier jonleverrier added commerce4 Issues related to Commerce v4 bug labels Mar 10, 2023
@jonleverrier
Copy link
Author

Just updated, to CraftCMS v4.4.1 and the issue is still there.

@pdaleramirez pdaleramirez added the 🔎 status: investigating Trying to reproduce label Mar 13, 2023
@pdaleramirez pdaleramirez self-assigned this Mar 13, 2023
@pdaleramirez pdaleramirez removed the 🔎 status: investigating Trying to reproduce label Mar 13, 2023
@pdaleramirez
Copy link
Contributor

@jonleverrier I can confirm the bug, but it seems to be a cms issue. We`ll report it to the cms.

@pdaleramirez
Copy link
Contributor

Created an issue in CMS here: craftcms/cms#12884

@lukeholder
Copy link
Member

This is now fixed in Commerce 4.2.6 which is now compatible with 4.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce4 Issues related to Commerce v4
Projects
None yet
Development

No branches or pull requests

3 participants