I had a problem with feeds entity processor, with EntityMalformedException and other errors popping up when importing Commerce products using this module. The practical outcome of these problems was that custom fields attached to the product entity were not imported (incl. stock) and left blank. This didn't happen to all imported or updated products, but only some (which is still peculiar).

When debugging, I reached this processor's getMappingTargets() override function which features the following lines to pull in custom fields:

    // Let other modules expose mapping targets.
    self::loadMappers();
    $type = $this->entityType();
    $bundle = $this->bundle();
    drupal_alter('feeds_processor_targets', $targets, $type, $bundle);

Seeing that the Feeds module's own node processor is using a new way of pulling in additional targets (introduced in dev which I'm using), I made the same change in this module (replacing the code above), thereby solving the problem:

    $this->getHookTargets($targets);

Sorry for not offering a ready-made patch, but the change is quite simple. Use it only if you have a similar problem and you're using Feeds dev.

Comments

joelpittet’s picture

Status: Needs review » Active

Should have patch if it's in need's review. https://www.drupal.org/node/156119#needs-review

megachriz’s picture

Status: Active » Closed (cannot reproduce)

This has has been fixed in #2581911: Missing mappings, closing this as a duplicate (although it was reported earlier).

megachriz’s picture

Status: Closed (cannot reproduce) » Closed (duplicate)