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

setCategory step failed due to no imported categories #653

Open
Melleschepers opened this issue Jul 18, 2023 · 2 comments
Open

setCategory step failed due to no imported categories #653

Melleschepers opened this issue Jul 18, 2023 · 2 comments

Comments

@Melleschepers
Copy link

Melleschepers commented Jul 18, 2023

Environment and configuration

  1. Akeneo connector v103.5.0
    Issue is introduced in 8b9ffb2

Steps to reproduce

  1. Have a setup where you don't import any categories from Akeneo
    image of settings
  2. Do a product import

Expected result

  1. A completed import where all the products are imported in Magento and not assigned to a category.

Actual result

  1. A failed import: [Warning: Undefined array key "NAMEOFCATEGORY" in /vendor/akeneo/module-magento2-connector-community/Job/Product.php on line 2972

Because of

// we get all link between category code and id
$categoryAkeneo = $connection->fetchAssoc(
$connection->select()->from(
[$akeneoEntitiesTable],
['code', 'entity_id']
)->where('import = "category"')
);

used in

$categoryAkeneo[$category]['entity_id'],

is empty since we don't import any categories from Akeneo.

@pimruiter
Copy link

I have the same issue on the same version. Instead of empty categories, I have an excluded Category tree in the Magento configuration.

In the code you supplied, the Akeneo connector is looking for excluded category codes.

@stevelou2
Copy link

Same issue, any fixes ??

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

3 participants