pimcore / customer-data-framework

Customer Data Framework community bundle adds capability for management of customer data to Pimcore.
https://pimcore.com/docs/platform/Customer_Management_Framework/
Other
81 stars 93 forks source link

Add original customer id check #516

Closed valentin- closed 8 months ago

valentin- commented 1 year ago

Using custom save handlers with isOriginalCustomerNeeded enabled, creating users always fails as Pimcore 11 requires string|int but the id is still null.

Message: Pimcore\Model\DataObject\AbstractObject::getById(): Argument #1 ($id) must be of type string|int, null given
Trace: 
in /app/vendor/pimcore/pimcore/models/DataObject/AbstractObject.php:203
#0 [internal function]: Pimcore\Model\DataObject\AbstractObject::getById(NULL, Array)
#1 /app/vendor/pimcore/customer-management-framework-bundle/src/CustomerProvider/DefaultCustomerProvider.php(300): call_user_func_array(Array, Array)
#2 /app/vendor/pimcore/customer-management-framework-bundle/src/CustomerProvider/DefaultCustomerProvider.php(219): CustomerManagementFrameworkBundle\CustomerProvider\DefaultCustomerProvider->callStatic('getById', Array)
#3 /app/vendor/pimcore/customer-management-framework-bundle/src/CustomerSaveManager/DefaultCustomerSaveManager.php(132): CustomerManagementFrameworkBundle\CustomerProvider\DefaultCustomerProvider->getById(NULL, true)
#4 /app/vendor/pimcore/customer-management-framework-bundle/src/CustomerSaveManager/DefaultCustomerSaveManager.php(140): CustomerManagementFrameworkBundle\CustomerSaveManager\DefaultCustomerSaveManager->rememberOriginalCustomer(Object(App\Model\DataObject\User))
CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

markus-moser commented 8 months ago

Thanks a lot!