New answers tagged


Feeds has presave and prevalidate events. So another way to approach this is to add an event subscriber (sample code from the maintainer). In this case, validation can be overridden with PROCESS_ENTITY_PREVALIDATE.


Why not use Feeds Tamper to assign a default Name?


You need to provide a value for the lcia_id key. In your Feeds Type mapping, we can see that the entity's ID (nid) is mapped to the JSON file's lcia_id, but, in your sample JSON file, the lcia_id value is missing. You could also consider using Feeds Tamper to set a default value when no value is available for lcia_id. Here is an example of how to use it.


There is certainly a more elegant way to do this, but for now I decided to patch the validator itself in /feeds/src/Feeds/Processor/EntityProcessorBase.php: if ($label || $label === '0' || $label === 0) { $messages[] = $this->t('The @entity %label failed to validate with the following errors: @errors', $args); if (mb_strtolower($this->...

Top 50 recent answers are included