Custom fetchers that doesn't need a source configuration, fails per default. The problem is that if sourceForm doesn't return a form, the $node->feeds value ends up not being an array. That causes problems later when feeds does a += defaultConfig. It can be worked around by adding a sourceForm that does:

  return array(
    '#type' => 'hidden',
    '#value' => 'dummy',
  );

But this still creates an empty Feeds fieldset.

Attached patch fixes the issue, and doesn't add the fieldset if it has no content.

Comments

franz’s picture

This patch seems to fix the issue only on node forms, what about standalone? I get the same error, using the workaround.

logaritmisk’s picture

StatusFileSize
new1.36 KB

Had the same issue, but with a standalone. After I found, and fixed, the issue I found this issue. My patch do almost the same thing, but should work for both standalone and for importers attached to nodes.

franz’s picture

This is highly more appropriate, thanks logaritmisk, I'll test this and report back.

franz’s picture

Status: Needs review » Fixed

Tested, fixes the issue. Committed.

Status: Fixed » Closed (fixed)

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