Skip to content
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

Import Categories fail in 1 action #197

Open
thanhtantran opened this issue Aug 20, 2018 · 10 comments
Open

Import Categories fail in 1 action #197

thanhtantran opened this issue Aug 20, 2018 · 10 comments

Comments

@thanhtantran
Copy link

I try to test import categories and get this error

bin/magento pimgento:import --code=category --file=categories.csv
[09:31:29] Start import
[09:31:29] Import id: 5b7a8a71a83d1
[09:31:29] Create temporary table
[09:31:29] completed
[09:31:29] Fill temporary table
[09:31:29] SQLSTATE[28000]: Invalid authorization specification: 1045 Access denied for user 'zzzmwxsvnj'@'%' (using password: YES), query was: LOAD DATA INFILE '/tmp/categories.csv' REPLACE
INTO TABLE tmp_pimgento_entities_category
CHARACTER SET UTF8
FIELDS TERMINATED BY ';'
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES;

@lbassin
Copy link

lbassin commented Aug 21, 2018

Hi @thanhtantran

It seems that your user isn't allowed to use the function "LOAD DATA INFILE". Some servers disabled it by default

In order to fix this, you may try to change LOAD DATA configuration

  • Go to magento dashboard. Stores > Configuration then Catalog > Pimgento
  • In the General section you'll find an option "Load Data Local" set to "No". Change this setting to "Yes"
  • Save and re-try to import data

If the error remains, try to change pimgento data insertion method this way

  • Go to magento dashboard. Stores > Configuration then Catalog > Pimgento
  • In the General section you'll find an option "Data insertion method" set to "Data in file". Change this setting to "By rows"
  • Save and re-try to import data

Note that "By rows" method is slower than "Data in file"

@thanhtantran
Copy link
Author

Thank you. I have successful import "by row", however that data from Akeneo is not compatible with Magento 2. This cause the categories imported without any information

My sample categories export from Akaneo bellow

code;label-en_US;parent
master;"Master catalog";
002;"Văn Học Nước Ngoài";master
021;"Hiện đại";002
022;"Hồi ký - Tự truyện";002
023;"Kiếm hiệp";002

@lbassin
Copy link

lbassin commented Aug 28, 2018

What do you mean by "imported without any information" ?
I tried to import the data your provided and it works

image

image image

@thanhtantran
Copy link
Author

thanhtantran commented Aug 28, 2018 via email

@thanhtantran
Copy link
Author

I don't know how to display image.

@lbassin : Do I need to configure anything in Configurations?

@lbassin
Copy link

lbassin commented Aug 29, 2018

I don't think there is a specific configuration to change
Have you tried removing the empty categories and importing them again ?

I'll need more information in order to fix this issue
What do you have in the pimgento entities table ? You may find this information with the sql query:

select * from pimgento_entities where import = 'category'

@thanhtantran
Copy link
Author

Yes. checked and already have pimgento_entities table. I have tried empty it re import but no sucess.

Maybe the problem is from Magento version. I tried the same categories export with 2.10, it works.

It not work with 2.25

@lbassin
Copy link

lbassin commented Aug 30, 2018

I don't think version has something to do in this issue, I successfully imported your data in a 2.2.5 magento installation

Have a closer look to the pimgento_entities table.
It is in charge to map akeneo entity to magento entity in order to avoid duplicate data
Maybe there was a problem in a previous import that corrupted data and now pimgento failed to match entities and import empty categories

@thanhtantran
Copy link
Author

I have installed a new Magento them import by Pimgento, that works very good.

But the second import when i want to add more categories or update the name of categories, it display nothing. Only (0) for the new added categories

screenshot_1

@lbassin
Copy link

lbassin commented Sep 12, 2018

Mhm this is a strange behavior. I'll try to repeat the same steps and see what happens

What categories did you import with the second file ? A mix of new and old ?
Does the update work on existing categories ?

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

No branches or pull requests

2 participants