Description
Preconditions and environment
-
Magento version 2.4.7-P8
-
B2B Company is enabled
Steps to reproduce
Customer import no longer works since 2.4.7-p8
When importing a customer file via Magento, and the customers are already all present in the "company_advanced_customer_entity" table,
We get an import error.
Indeed, the "processDefaultStatus" function was added since 2.4.7-p8 (vendor/magento/module-company-customer-import-export/Model/Import/Customer.php). This function checks for non-existent IDs in the company_advanced_customer_entity table to import them.
Except that if all the customers are present, the "$nonExistingIds" variable is empty. This throws the error:
[2025-04-24T10:02:58.178003+00:00] report.ERROR: Error during Customer Import Cron: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1, query was: INSERT INTO
company_advanced_customer_entity (
customer_id) VALUES [] []
To correct this, I added the condition
Expected result
Import success
Actual result
Import error
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.