commerce icon indicating copy to clipboard operation
commerce copied to clipboard

[5.x]: The variants in product draft seems not working correctly

Open bhupeshappfoster opened this issue 1 year ago • 3 comments

What happened?

Description

When a draft of any product having variant is created the changes made to the variants title get reflected directly on live site without applying the draft.

Steps to reproduce

  1. Create a product with variant.
  2. Create a draft of product using create draft button available on top right of product edit page.
  3. Switch to draft and make any change in variant title for single or multiple sites.
  4. Save the draft and switch back to current version.
  5. Checkout the variant title of current version are changed to whatever changes we made in draft version.

Expected behaviour

The changes made to draft should not reflect in current version unless draft is applied.

Actual behaviour

Any change we make to variant in draft also changes the variant in current version.

Craft CMS version

5.3.6

Craft Commerce version

5.0.17

PHP version

8.2

Operating system and version

Linux, ubuntu 22.04

Database type and version

Mysql, 8.0.39

Image driver and version

No response

Installed plugins and versions

  • Craft commerce: 5.0.17
  • Ckeditor: 4.0.2

bhupeshappfoster avatar Aug 27 '24 07:08 bhupeshappfoster

@bhupeshappfoster at the moment variants behave the same way as matrix and address fields.

Check out this issue to follow along with any improvements we make to the nested element behavior:

https://github.com/craftcms/cms/discussions/14603

lukeholder avatar Aug 28 '24 15:08 lukeholder

@lukeholder Thank you very much. Apologies i was not able to find the referenced issue otherwise i would have not opened this ticket.

Do let me know if you want me to close this one or please feel free to close.

bhupeshappfoster avatar Aug 28 '24 15:08 bhupeshappfoster