Closed Thijzer closed 4 years ago
Hi @Thijzer, Could you describe about the error that you qualify and send us steps to reproduce it on a local environment?
Regards,
Here is the error
[2019-11-20 10:51:39] console.ERROR: Error thrown while running command "akeneo:batch:job csv_export_products 126 --env=prod --email='sysadmin@induxx.be'". Message: "Argument 1 passed to Akeneo\Tool\Bundle\ClassificationBundle\Doctrine\ORM\Repository\CategoryRepository::getAllChildrenCodes() must implement interface Akeneo\Tool\Component\Classification\Model\CategoryInterface, null given, called in /var/www/akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Enrichment/Bundle/Elasticsearch/Filter/Field/CategoryFilter.php on line 160" {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Akeneo\\Tool\\Bundle\\ClassificationBundle\\Doctrine\\ORM\\Repository\\CategoryRepository::getAllChildrenCodes() must implement interface Akeneo\\Tool\\Component\\Classification\\Model\\CategoryInterface, null given, called in /var/www/akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Enrichment/Bundle/Elasticsearch/Filter/Field/CategoryFilter.php on line 160 at /var/www/akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/ClassificationBundle/Doctrine/ORM/Repository/CategoryRepository.php:140)","command":"akeneo:batch:job csv_export_products 126 --env=prod --email='sysadmin@induxx.be'","message":"Argument 1 passed to Akeneo\\Tool\\Bundle\\ClassificationBundle\\Doctrine\\ORM\\Repository\\CategoryRepository::getAllChildrenCodes() must implement interface Akeneo\\Tool\\Component\\Classification\\Model\\CategoryInterface, null given, called in /var/www/akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Enrichment/Bundle/Elasticsearch/Filter/Field/CategoryFilter.php on line 160"} []
Version:CE 3.0.38
How to reproduce this error is unknown to me. It was reported and found when triggering a product export csv_export_products.
All I can say is that this customer heavily relies on import profiles and scripting which makes it harder to debug.
I just solved the issue by editing the export profiles category selection to all. It might be that we had a code in the Job parameters that was removed.
These persisted parameters with code references can get out of sync.
Thanks for sharing the way to solve the issue with us!
I closed this issue, feel free to reopen it if needed.
Regards,
https://github.com/akeneo/pim-community-dev/blob/6ecf7ea9ca0ed35d9f94620c5f9405830f2892a9/src/Akeneo/Pim/Enrichment/Bundle/Elasticsearch/Filter/Field/CategoryFilter.php#L159-L160
Version:CE 3.0.38