I've built a custom fetcher and parser (neither have configurable elements), created a new importer, and exported that to code.

Attempting to run the import (through the UI at /import/my_custom_importer) causes the error:
Fatal error on running import: "Unsupported operand types in /FeedsConfigurable.inc"

The import form creates a fieldset called "feeds" with #tree set to TRUE, then attempts to add in the importer's configuration. As there isn't any configuration, the values in the form submit handler include "tree" => NULLL. This results in invoking $source->addConfig(NULL), but config is always expected to be an array.

NB: there's a bunch of similar issues in the feeds queue which appear to be facing the same problem from different directions. I've found one approach to solve this, there may be an alternative, or more generic solution.
Similar issues:

Comments

manarth’s picture

Status: Active » Needs review
StatusFileSize
new518 bytes

Patch attached.

franz’s picture

Status: Needs review » Needs work

I think this logic should rather be implemented inside the addConfig() method.

rogarbe’s picture

This patch work rightly for me.

Thank you manarth

joelpittet’s picture

Issue summary: View changes

This looks like it has been added already to the latest dev.

  if (!empty($form_state['values']['feeds']) && is_array($form_state['values']['feeds'])) {
    $source->addConfig($form_state['values']['feeds']);
    $source->save();
  }
twistor’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.