[5.x]: The variants in product draft seems not working correctly
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
- Create a product with variant.
- Create a draft of product using
create draftbutton available on top right of product edit page. - Switch to draft and make any change in variant title for single or multiple sites.
- Save the draft and switch back to current version.
- 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 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 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.