It boils down to this: you cannot update a customer using the rest api using the latest RC.
{
"customer": {
"firstname": "Myfirstname",
"lastname": "Mylastname"
}
}
{
"message": "Please enter a customer email.",
"trace": "#0 /var/www/vendor/magento/module-eav/Model/Entity/VersionControl/AbstractEntity.php(90): Magento\\Customer\\Model\\ResourceModel\\Customer->_beforeSave(Object(Magento\\Customer\\Model\\Customer))\n#1 [internal function]: Magento\\Eav\\Model\\Entity\\VersionControl\\AbstractEntity->save... long stack trace
IF I include a customer email, it insists that i include the website_id as well, which at that point it is attempting to create a new customer. (I've stepped through the code).
If this bug is able to be reproduced by ANYONE, I'll go ahead and really flesh out this ticket with more details.
I have noticed that the $customerModel->save() on line https://github.com/magento/magento2/blob/develop/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php#L193 does not take into consideration any preexisting data. This data is already available from line 141 above as $prevCustomerData.
The customerModel->save() attempts a full validation on the customer, and since the rest api call is only specified that you send in the changes you want to have happen to the object, it reports missing things like email and website ID inside of customer\Model\ResourceMode\Customer.php on lines 103+
Reinstalled magento. Seems to work ok.
I am having this same issue on 2.1.7
Hi, mitcht.
Could you please explain the solution of that issue?
I met that issue on Magento 2.1.7 and 2.1.9.
a:4:{i:0;s:30:"Please enter a customer email.";i:1;s:16296:"#0 ...
Is there a reason this is closed? I still cannot find a customer update endpoint with self permissions.
This issue is still there on Magento EE2.1.19, Before that, I updated Magento from version EE2.1.6.
API always returns
"message": "Please enter a customer email.",
when I want to update customer information.
As I known, All info from the Request are used in $inputData in vendor/magento/module-webapi/Controller/Rest/InputParamsResolver.php:100
but the value that Magento returns is $inputParams, This one does not consist of data from API request.