Skip to content

Set fallback values for email and _website columns to avoid 'undefined index' error in CustomerComposite.php #18679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2018
Merged

Set fallback values for email and _website columns to avoid 'undefined index' error in CustomerComposite.php #18679

merged 1 commit into from
Oct 27, 2018

Conversation

TomashKhamlai
Copy link
Contributor

@TomashKhamlai TomashKhamlai commented Oct 17, 2018

Description (*)

There are proper validation messages for ERROR_CODE_COLUMN_NOT_FOUND and ERROR_CODE_COLUMN_NAME_INVALID but this code is not reachable.

Fixed Issues (if relevant)

  1. None, please, look into manual testing scenarios

Manual testing scenarios (*)

  1. Create a Customer
  2. Navigate to Customers -> All Customers and export them all
  3. Navigate to System -> Import and use the CSV of all your customers. Use Add/Update behavior and "Customers and Addresses (single file)" as an entity type.

Expected result:
At least one of the two validation messages:

We can't find required columns: email", "_website.

Column names: "ID", "Name", "Email", "Group", "Phone", "ZIP", "Country", "State/Province", "Customer Since", "Web Site", "Confirmed email", "Account Created in", "Billing Address", "Shipping Address", "Date of Birth", "Tax VAT Number", "Gender", "Street Address", "City", "Fax", "VAT Number", "Company", "Billing Firstname", "Billing Lastname", "Account Lock" are invalid

Actual result:
Notice: Undefined index: email in /var/www/html/pr/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php on line 302

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Oct 17, 2018

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @TomashKhamlai. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me $VERSION instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@TomashKhamlai
Copy link
Contributor Author

Hello, @rogyar. Few days ago I reinstalled the system om my workstation and git was not properly configured. Git used my unix-system username [email protected] as email to sign my commit message, as a result I am not able to sign the CLA.. Is it a good idea to reset to unchanged state, then merge upstream, then apply changes as a patch and force push into my fork branch?

@ihor-sviziev
Copy link
Contributor

@TomashKhamlai sure! Please do that!

…d index' error in CustomerComposite.php

CLA will be signed
@TomashKhamlai
Copy link
Contributor Author

@ihor-sviziev done.

@magento-engcom-team magento-engcom-team merged commit 8bea285 into magento:2.3-develop Oct 27, 2018
magento-engcom-team pushed a commit that referenced this pull request Oct 27, 2018
…oid 'undefined index' error in CustomerComposite.php #18679
@magento-engcom-team
Copy link
Contributor

Hi @TomashKhamlai. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants