Skip to content

Import function rejecting MacOS line endings #6393

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

Closed
philcook opened this issue Aug 30, 2016 · 2 comments
Closed

Import function rejecting MacOS line endings #6393

philcook opened this issue Aug 30, 2016 · 2 comments

Comments

@philcook
Copy link

Preconditions

  1. Magento 2.1
  2. Apache 2.4
  3. PHP 5.6

Steps to reproduce

  1. Take example product CSV from magento and change line endings to be MacOS format like attached catalog_product.csv.zip
  2. Try to import with native magento imported

Expected result

  1. When end of row should act as end of product insert and move onto next row.

Actual result

  1. See last item of row and first item of next row is combined into one.

magento2importfailmacos

@sevos1984
Copy link
Contributor

This is actually a php problem. You can fix this by adding 'php_value auto_detect_line_endings 1' into .htaccess file. Closing as not a bug.

@philcook
Copy link
Author

philcook commented Sep 5, 2016

@sevos1984 fair enough point here however the auto_detect_line_endings by default in PHP is 0 therefore many users are going to have this issue.
http://php.net/manual/en/filesystem.configuration.php

Can I therefore suggest it's added to the .htaccess file given with magento2 by default. This will solve the issue and not be an issue going forward.

I will do a PR for this shortly.

magento-engcom-team pushed a commit that referenced this issue Nov 28, 2020
[Arrows] Fixes for 2.4 (pr111) (2.4-develop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants