diff --git a/feeds.drush.inc b/feeds.drush.inc index f0eefc9..a1f56ee 100644 --- a/feeds.drush.inc +++ b/feeds.drush.inc @@ -306,8 +306,9 @@ function drush_feeds_import($importer_id = NULL) { return FALSE; } elseif (!$importer->isEnabled()) { - drush_set_error(dt("The importer '@importer' is not enabled.", array( + drush_set_error(dt("The importer '@importer' is not enabled. You can enable it with the command '@command'.", array( '@importer' => $importer_id, + '@command' => 'drush feeds-enable ' . $importer_id, ))); return FALSE; } @@ -554,8 +555,9 @@ function drush_feeds_clear($importer_id = NULL) { return FALSE; } elseif (!$importer->isEnabled()) { - drush_set_error(dt("The importer '@importer' is not enabled.", array( + drush_set_error(dt("The importer '@importer' is not enabled. You can enable it with the command '@command'.", array( '@importer' => $importer_id, + '@command' => 'drush feeds-enable ' . $importer_id, ))); return FALSE; } diff --git a/feeds.module b/feeds.module index a38643a..afa44b9 100644 --- a/feeds.module +++ b/feeds.module @@ -407,10 +407,14 @@ function feeds_admin_paths() { * Menu loader callback. */ function feeds_importer_load($id) { - $importer = feeds_importer($id); - if ($importer->doesExist()) { - return $importer; + try { + $importer = feeds_importer($id); + if ($importer->doesExist()) { + return $importer; + } } + catch (InvalidArgumentException $e) {} + return FALSE; } diff --git a/tests/feeds_scheduler.test b/tests/feeds_scheduler.test index fb605a8..ee15779 100644 --- a/tests/feeds_scheduler.test +++ b/tests/feeds_scheduler.test @@ -288,4 +288,5 @@ class FeedsSchedulerTestCase extends FeedsWebTestCase { 'count' => $count, ); } + }