Problem/Motivation

Exception: Empty configuration identifier. in FeedsConfigurable::instance() (line 55 of feeds/includes/FeedsConfigurable.inc).

Steps to reproduce:

Fail:
/ca/import/

Works:
/ca/import

Proposed resolution

Exit early on the menu object loading if the $id is empty.

Remaining tasks

User interface changes

n/a

API changes

Original report by @giorgio79

I started getting this message when accessing admin/structure/feeds/tamper/list/

CommentFileSizeAuthor
#7 exception_empty-1887632-7.patch332 bytesjoelpittet

Comments

hvalentim’s picture

+1
Works fine you use latest dev versions from both Feeds and Feeds Tamper.

mjbirdge’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev

I have the same error message, when I try to access /admin/structure/feeds/:
Exception: Empty configuration identifier. in FeedsConfigurable::instance() (line 55 of sites/all/modules/feeds/includes/FeedsConfigurable.inc).

Not sure if this is a Feeds or Feeds Tamper issue, but noticed this post.
I have tried this with both of the following configurations with the same error:

  • Feeds 7.x-2.x-dev, Feeds Tamper 7.x-1.x.dev
  • Feeds 7.x-2.0-alpha8, Feeds Tamper 7.x-1.x

I was able to temporarily work around this error message by going into the FeedsConfigurable.inc, and commenting out the line causing the code to throw an exception:

  public static function instance($class, $id) {
    // This is useful at least as long as we're developing.
    if (empty($id)) {
      #throw new Exception(t('Empty configuration identifier.'));
    }
    static $instances = array();
    if (!isset($instances[$class][$id])) {
      $instances[$class][$id] = new $class($id);
    }
    return $instances[$class][$id];
  }
twistor’s picture

Assigned: Unassigned » twistor
Status: Active » Needs work

I would have to guess that you deleted an importer that feeds tamper missed.

twistor’s picture

Status: Needs work » Postponed (maintainer needs more info)

@mjbirdge, Can you give me some more information about your setup? Specifically, what importers exist, and which of them are enabled/disabled?

jet-lagger’s picture

Issue summary: View changes

I have the same problem with both version configurations

twistor’s picture

Assigned: twistor » Unassigned
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
joelpittet’s picture

Status: Closed (cannot reproduce) » Needs review
StatusFileSize
new332 bytes

I'm getting this too, I've got a multilingual site but I don't think that matters much.

Fail:
/ca/import/

Works
/ca/import

This patch seems to do the trick

Status: Needs review » Needs work

The last submitted patch, 7: exception_empty-1887632-7.patch, failed testing.

joelpittet’s picture

Project: Feeds Tamper » Feeds
Status: Needs work » Needs review

Failed because it was a feeds issue. Moving this over there.

Status: Needs review » Needs work

The last submitted patch, 7: exception_empty-1887632-7.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review

*squints* at testbot...

Status: Needs review » Needs work

The last submitted patch, 7: exception_empty-1887632-7.patch, failed testing.

joelpittet’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs work » Needs review

Whoops wrong branch, no wonder.

joelpittet’s picture

Issue summary: View changes

  • twistor committed 4fbba37 on 7.x-2.x authored by joelpittet
    Issue #1887632 by joelpittet: Exception: Empty configuration identifier.
    
twistor’s picture

Status: Needs review » Fixed

I couldn't reproduce the bug, but I believe you.

I changed the patch a bit, it's better to have all of the id validation logic in one place.
Also, empty() isn't safe to use since 0 (zero) is technically a valid importer id :/.

joelpittet’s picture

@twistor Awesome that fixed it too:)

I wasn't sure if 0 was a valid value either, normally for me it's not:)

Status: Fixed » Closed (fixed)

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