You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.
When using module-customer-import-export/Model/Import/Customer.php to update existing customers, attributes that are in customer_entity and are not in the data to update will be nullified. For instance, updating customer name and or group through the importer would empty that customers password / rp_roken etc. This happens because in the _saveCustomerEntities function all fields of the customer are passed to insertOnDuplicate function.
Preconditions
Magento version 2.1.4
Steps to reproduce
Update a existing customer with not all fields specified ie: just email and name or group_id through module-customer-import-export/Model/Import/Customer.php
Expected result
Attributes that are not in update data should not be updated
Actual result
Attributes that where not in the update data are nullified.
Resolution
In the function call on vendor/magento/module-customer-import-export/Model/Import/Customer.php:264 $this->customerFields should not be passed to the insertOnDuplicate function. The logic of insertOnDuplicate would then automatically build the query for the fields that are actually in the update data.
Query that now is beeging generated when updating customers:(group_id,store_id,created_at,updated_at,entity_id,firstname,lastname,gender,email):
From @Robin31 on February 14, 2017 13:42
When using module-customer-import-export/Model/Import/Customer.php to update existing customers, attributes that are in customer_entity and are not in the data to update will be nullified. For instance, updating customer name and or group through the importer would empty that customers password / rp_roken etc. This happens because in the _saveCustomerEntities function all fields of the customer are passed to insertOnDuplicate function.
Preconditions
Steps to reproduce
Expected result
Actual result
Resolution
In the function call on vendor/magento/module-customer-import-export/Model/Import/Customer.php:264 $this->customerFields should not be passed to the insertOnDuplicate function. The logic of insertOnDuplicate would then automatically build the query for the fields that are actually in the update data.
Query that now is beeging generated when updating customers:(
group_id
,store_id
,created_at
,updated_at
,entity_id
,firstname
,lastname
,gender
,email
):Query that should have been generated when updating customers
group_id
,store_id
,created_at
,updated_at
,entity_id
,firstname
,lastname
,gender
,email
:Copied from original issue: magento/magento2#8548
The text was updated successfully, but these errors were encountered: