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

Product name update fails with variant auto-rename feature #2680

Closed
Anddrrew opened this issue Feb 16, 2024 · 0 comments
Closed

Product name update fails with variant auto-rename feature #2680

Anddrrew opened this issue Feb 16, 2024 · 0 comments
Assignees
Labels

Comments

@Anddrrew
Copy link
Contributor

Describe the bug
Trying to change a product's name with "Automatically update the names of ProductVariants" selected causes an error.

To Reproduce
Steps to reproduce the behavior:

  1. Visit any product page.
  2. Edit the product's name.
  3. Make sure "Automatically update the names of ProductVariants" is checked.
  4. Click the "Update" button.
  5. Error message appears: "An error occurred, could not update Product".

Expected behavior
The product and its variants should be renamed without issues.

Environment

  • @vendure/core: 2.1.7
  • Nodejs: 20.10
  • Database: Postgres

Additional context
The bug is related to handling product variants that have a custom field set to readonly: true.

It looks like a type checking problem in the util function
https://github.com/vendure-ecommerce/vendure/blob/master/packages/admin-ui/src/lib/core/src/data/utils/remove-readonly-custom-fields.ts#L106
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🚀 Shipped
Development

No branches or pull requests

2 participants