To create unlinked variant in database:
1.Import variant with non-existing value for characteristic
2. Delete characteristic from main product
Import this data to demo:
product_parent_id;product_name;product_code;product_type;categories;Color
0;Crocks;Crocks;main;product category;Blue
Crocks;Linked;Crocks_1;variant;;Blue
Crocks;Unlinked;Crocks_Other_9999;variant;;PinkyGreen
1. Open product Crocks
2. Go to manage variants
3. Open both variants in new browser tabs
4. In first tab go back to main product and delete characteristic color, than save and close.
5. Refresh both tabs with variant. The variant with name "Linked" is gone(empty form), but variant with name "Unlinked" is still present.
If you add the same characteristic to main product again, the original "Unlinked" is gone, but all variants have the same name and product_code starts with "Unlinked" product's code instead of product's code of parent.
This bug is present from 2.3.4 and I have fix against 2.3.5 if necessary.
There were 2 other ways to create unlinked variant with no parent , but I hadn't time to test it on 2.4 yet.