Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce:
1. Create a new Drupal installation with Feeds, Feeds Tamper, and dependencies.
2. Create a node importer (CSV), with a title field.
3. Make the title field required w/ Feeds Tamper.
4. Import a CSV.
The "Required Field" plugin does not have any settings, line 67 of feeds_tamper.module (as well as lines 60 and 64) assumes that the settings piece will be there:
<?php
if ($is_array && $plugin['multi'] == 'loop') {
foreach ($item[$element_key] as &$i) {
$plugin['callback']($source, $item_key, $element_key, $i, $instance->settings);
}
}
elseif ($is_array && $plugin['multi'] == 'direct') {
$plugin['callback']($source, $item_key, $element_key, $item[$element_key], $instance->settings);
}
elseif (!$is_array && $plugin['single'] != 'skip') {
$plugin['callback']($source, $item_key, $element_key, $item[$element_key], $instance->settings);
}
?>
Comment | File | Size | Author |
---|---|---|---|
#1 | feeds_tamper-2052983-1.patch | 693 bytes | m.stenta |
Comments
Comment #1
m.stentaAttached is a patch that fixes the issue in both D7 and D6 branches of Feeds Tamper.
Comment #2
m.stentaComment #3
twistor CreditAttribution: twistor commented7.x http://drupalcode.org/project/feeds_tamper.git/commit/1e5af38
6.x http://drupalcode.org/project/feeds_tamper.git/commit/c8164bd