Closed thibaultjadoul closed 1 month ago
I'm experiencing two major issues with Feed Me 6.4.0 when using Craft Commerce 5:
Is it possible to release a dev version with only the stock import fix from 6.4.0? This would allow me to bypass the regressions in 6.4.0 while still benefiting from the stock import improvements.
Thanks for your help!
Hi, thanks for reporting! I raised a PR for this.
Feed Me 6.4.1 is out with the Commerce Variant import fix.
Description
I encountered an issue when importing a new Product and Variant in Craft Commerce. The error occurs during the parseField function when it tries to import values into custom fields.
The error message is as follows:
Logs for importing a custom field at the Product level:
Logs for importing a custom field at the Variant level:
From the logs, it’s clear that $element->getFieldLayout() is returning null, and the $element object has no fieldLayoutId, id, or draftId.
Steps to Reproduce
Try to import a new Product and Variant with custom fields that do not yet exist in Craft Commerce using FeedMe. Monitor the logs and observe the error when the import process reaches the parseField function for custom fields.
Expected Behavior
The product and variant should be imported successfully, including their custom fields.
Actual Behavior
The import process fails when trying to assign values to custom fields, resulting in the error: Call to a member function getFieldByHandle() on null - Fields.php:216.
Versions
Craft CMS: 5.4.6 Craft Commerce: 5.1.3 FeedMe: 6.4.0