Hello,
Basically, a characteristic "vendor" do not have any value in the database ; that characteristic is using element provided dynamically via a special trigger.
Due to the fact that there is no "values", you can't have a default value for the vendor because you can't store that information in the database.
So, something has to be changed in the "toggle" in order to avoid to affect a value where there is no available values.
Now regarding the rest, there is a line of code :
$query = 'SELECT * FROM ' . hikashop_table('variant') . ' WHERE variant_product_id = ' . $element->product_parent_id . ' AND variant_characteristic_id NOT IN (' . implode(',', array_keys($element->characteristics)) . ')';
The variable $element->characteristics can have an entry without a name ; so if you do a "array_keys", you can have an empty string in the array of result and not just numbers. That explain one of the errors you got.
That's why, I proposed to replace for the HikaShop product class (in the function updateCharacteristics, that code
$query = 'DELETE FROM ' . hikashop_table('variant') . ' WHERE variant_product_id = ' . $product_id;
if(!empty($element->characteristics))
$query .= ' AND variant_characteristic_id NOT IN (' . implode(',', array_keys($element->characteristics)) . ')';
into
$c = $element->characteristics;
unset($c['']);
$query = 'DELETE FROM ' . hikashop_table('variant') . ' WHERE variant_product_id = ' . $product_id;
if(!empty($c))
$query .= ' AND variant_characteristic_id NOT IN (' . implode(',', array_keys($c)) . ')';
unset($c);
Thus it will avoid the SQL error when updating the characteristics.
Regarding the toggle part ; we have to perform deeper investigation and see how we can improve the structure to allow dynamic characteristics like the "vendors" one, to still have the possibility to have a default value (even if there is no values in the database).
Please note that you have to revert the Nicolas' patch.
Regards,